Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 44232 invoked from network); 25 Aug 2002 01:29:48 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 25 Aug 2002 01:29:48 -0000 Received: (qmail 29690 invoked by uid 97); 25 Aug 2002 01:30:17 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 29646 invoked by uid 97); 25 Aug 2002 01:30:16 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 29634 invoked by uid 98); 25 Aug 2002 01:30:16 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) X-Sent: 25 Aug 2002 01:29:45 GMT Message-ID: <3D68330B.8010206@ehatchersolutions.com> Date: Sat, 24 Aug 2002 21:29:47 -0400 From: Erik Hatcher User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: exec command deprecated since Ant 1.2 but recommended in Ant 1.5? References: <3D67DB1F.108@yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N The Javadocs are not quite the place to go to learn about Ant tasks, at least not at an Ant "user" perspective. Use the HTML task documentation for that. But if you want to match up what class corresponds to, look at the embedded defaults.properties files in ant.jar (org/apache/tools/ant/taskdefs/defaults.properties) - this is how Ant constructs the objects used as built-in/optional tasks. Erik Amar Rama wrote: > Hi, > I am looking for some answers around the usage of the 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 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. > * > *

As of Ant 1.2, this class is no longer the > * implementation of Ant's <exec> task - it is considered to be > * dead code by the Ant developers and is unmaintained. Don't use > * it.

> > * @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: > For additional commands, e-mail: > > > -- To unsubscribe, e-mail: For additional commands, e-mail: