ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amar Rama <trilogya...@yahoo.com>
Subject exec command deprecated since Ant 1.2 but recommended in Ant 1.5?
Date Sat, 24 Aug 2002 19:14:39 GMT
Hi,
    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 
org.apache.tools.ant.Task. 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?" 
(http://jakarta.apache.org/ant/faq.html#batch-shell-execute) 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,
amar

___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 duncan@x180.com
 * @author rubys@us.ibm.com
 *
 * @deprecated delegate to {@link org.apache.tools.ant.taskdefs.Execute 
Execute}
 *             instead.
 */



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message