Java Mailing List Archive

Apache Ant Archive

» Ant Users List
» Ant Developers List
Ant support for daemon processes

Ant support for daemon processes

2007-06-06       - By Vladimir Egorov
Reply:     1     2  

Hi Ant Users,

I am interested in Ant support for daemon processes, such as servers.
For example, I would like to stop an Exec or Java process on demand -
this is not possible with existing Exec and Java tasks.

Ant manual for parallel task has the following example that "represents
a typical pattern for testing a server application":

 <wlrun ... >
   <sleep seconds="30"/>
   <junit ... >

Above <wlstop> is a proprietary task that only works with WL. I am
looking for a generic 'kill' task that can kill a referenced process.

The above example may look like this.

 <exec id='myserver'
   <sleep seconds="30"/>
   <junit ... >
   <kill id='myserver'/>

Unlike the WL example, we are not using a proprietary stop mechanism.
The <kill> task is a generic task that calls Process.destroy(), and
works for both Exec and Java processes.

Is there anything in the Ant World on this?
Thank you,


P.S. Another area is full support for 'spawn' attribute. Right now:

   $ ant -version
   Apache Ant version 1.6.5 compiled on June 2 2005
   $ cat t.xml
     <exec executable="ls" spawn="true" timeout="1000"/>
   $ ant -f t.xml
   Buildfile: t.xml
   spawn does not allow attributes related to input, output, error,
   spawn also does not allow timeout
   finally, spawn is not compatible with a nested I/O <redirector>

Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally
privileged, and is intended solely for the use of the individual or entity
named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete

To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.