ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Hudak" <charles.hu...@cardionet.com>
Subject RE: Using command line arguments
Date Thu, 16 Sep 2004 18:14:10 GMT
Create a clean target that removes the build directory.

If you want to do a clean before compile, run 'ant clean compile'. If
you don't, run 'ant compile'. Pretty standard stuff...

> -----Original Message-----
> From: Satish Jeejula [mailto:Satish_Jeejula@irco.com] 
> Sent: Thursday, September 16, 2004 11:08 AM
> To: user@ant.apache.org
> Subject: Using command line arguments
> 
> 
> Hi All,
>  
> I just started learning ANT tool. I have a simple build file 
> that compiles java file into a build directory successfully. 
> The build file right now deletes the build directory every 
> time it runs. I would like to change it such a way so that 
> the build directory is deleted only when user specifies it as 
> command-line argument.
>  
> e.g.: ant -f compile.xml compile -DdeleteBuildDir=true  ----> 
> should delete the build directory
> e.g.: ant -f comile.xml compile ----> should not delete the 
> build directory.
>  
> I am thinking of creating another target which deletes the 
> directory. Then execute that target only when this 
> command-line argument is passed.
>  
> Please let me know if this can achieved and if so, any clue 
> or hints will help me.
>  
> Thanks,
> Satish
> 
> 
> 
> -----------------------------------------
> The information contained in this message is privileged and 
> intended only for the recipients named. If the reader is not 
> a representative of the intended recipient, any review, 
> dissemination or copying of this message or the information 
> it contains is prohibited. If you have received this message 
> in error, please immediately notify the sender, and delete 
> the original message and attachments.
> 

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


Mime
View raw message