ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satish Jeejula" <>
Subject Using command line arguments
Date Thu, 16 Sep 2004 18:08:27 GMT
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
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.

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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message