ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amar Rama <>
Subject exec command deprecated since Ant 1.2 but recommended in Ant 1.5?
Date Sat, 24 Aug 2002 19:14:39 GMT
    I am looking for some answers around the usage of the  <exec> 
command and would be grateful for any assistance :-).

According to the javadoc in the source code of the exec command 
(reproduced below), this command has been deprecated since Ant 1.2 and 
the use of the Execute command is suggested instead.

    The execute command though just extends java.lang.Object and not So, I am not sure I follow how I should use 
it in my build.xml (preliminary searches did not yield any results). I 
tried using the exec command and it works but I need to extend it to add 
minor custom functionality and I rather not extend a deprecated class.

    The FAQ on the home page for "How do I execute a batch file or shell 
script from ant?" 
( still 
recommends using the <exec> command. Since this is the most recent FAQ, 
I am interpreting this as meaning, use the exec command for Ant 1.5. 
This seems slightly contradictory to the comment in the code.

    Can anybody suggest the right direction to take.

thanks for all the help in advance,

___Javadoc from the exec source code____
 * Executes a given command if the os platform is appropriate.
 * <p><strong>As of Ant 1.2, this class is no longer the
 * implementation of Ant's &lt;exec&gt; task - it is considered to be
 * dead code by the Ant developers and is unmaintained.  Don't use
 * it.</strong></p>

 * @author
 * @author
 * @deprecated delegate to {@link 
 *             instead.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message