You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Erik Price <ep...@ptc.com> on 2003/01/06 16:37:35 UTC

executing a "clean" task

Hi,

I have written a very small build.xml script for ant modeled after the 
example in the "Using Ant" docs on the Jakarta web site.  The example I 
followed includes a task named "clean", but neither the default task nor 
any of its dependencies depend on "clean".  Therefore, it will never be 
executed.

Is there a way to get a specific task to execute by passing in some 
commandline parameter?  Essentially I have modified the "clean" task in 
my build.xml to delete the build directory, but I'm not sure how to get 
"clean" to execute instead of "dist", which is my default task.  I 
didn't see mention of this in the docs, or I missed it, only how to set 
property names/values from the command line with -D.


Thanks,

Erik


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: executing a "clean" task

Posted by Laurence Mastrorillo <ma...@medias.cnes.fr>.
Type "ant" followed by the name of the task you whish to execute. In your
case "ant clean".
Laurence

Erik Price a écrit :

> Hi,
>
> I have written a very small build.xml script for ant modeled after the
> example in the "Using Ant" docs on the Jakarta web site.  The example I
> followed includes a task named "clean", but neither the default task nor
> any of its dependencies depend on "clean".  Therefore, it will never be
> executed.
>
> Is there a way to get a specific task to execute by passing in some
> commandline parameter?  Essentially I have modified the "clean" task in
> my build.xml to delete the build directory, but I'm not sure how to get
> "clean" to execute instead of "dist", which is my default task.  I
> didn't see mention of this in the docs, or I missed it, only how to set
> property names/values from the command line with -D.
>
> Thanks,
>
> Erik
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: executing a "clean" task

Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
your main target should look like
<target name="mymaintarget" depends="clean" >
   <task1/>
   <task2/>
   ....
</target>
then clean will be called.
Is this OK ?
Antoine
----- Original Message -----
From: "Erik Price" <ep...@ptc.com>
To: <an...@jakarta.apache.org>
Sent: Monday, January 06, 2003 4:37 PM
Subject: executing a "clean" task


> Hi,
>
> I have written a very small build.xml script for ant modeled after the
> example in the "Using Ant" docs on the Jakarta web site.  The example I
> followed includes a task named "clean", but neither the default task nor
> any of its dependencies depend on "clean".  Therefore, it will never be
> executed.
>
> Is there a way to get a specific task to execute by passing in some
> commandline parameter?  Essentially I have modified the "clean" task in
> my build.xml to delete the build directory, but I'm not sure how to get
> "clean" to execute instead of "dist", which is my default task.  I
> didn't see mention of this in the docs, or I missed it, only how to set
> property names/values from the command line with -D.
>
>
> Thanks,
>
> Erik
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>