ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vimil Saju <>
Subject Re: Regarding exec task
Date Tue, 14 Feb 2012 13:12:36 GMT
Thanks Stefan, 

Your help is very much appreciated. Would using a custom CommandLauncher make it possible
for all the built-in ant tasks that support fork attribute to use it. 
I was thinking of an approach similar to how ant allows property expansion to be customized.
By just adding our own custom PropertyHelper we can change how properties are expanded globally.
If we have something like that for processes too, it would be great.  

I'd like to write a patch for this if possible, but I'd like to know the best way to implement
it, without breaking anything else. My idea was to provide something like ProcessHelper class
that can be stored as a reference in the project. The Execute class then calls this class
to get an appropriate Process implementation. This ProcessHelper class should then have the
ability to provide a default Process implementation as well as a mechanism to delegate process
creation to a user-defined class. 

Thanks again. 

 From: Stefan Bodewig <>
Sent: Tuesday, February 14, 2012 4:46 AM
Subject: Re: Regarding exec task
On 2012-02-12, Vimil Saju wrote:

> So I thought of somehow extending the 'Execute' class of ant to use
> the functionality of this 3rd party library, but I find that its
> difficult if not impossible to extend this class.

It has certainly not been designed for this, no.

> Is it possible to make the Execute class in ant extensible so that it
> becomes possible to plugin our own implementation of Process class.

If you had a way to provide your own CommandLauncher then you could wrap
Execute's default choice with your own implementation and return a
Process class of your liking.  This is not possible today, but I'm
testing whether this would be enough for you.


To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message