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. 
Vimil


________________________________
 From: Stefan Bodewig <bode...@apache.org>
To: dev@ant.apache.org 
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.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to