IntelliJ Java IDE
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant Command Line arguments Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Ant Command Line arguments" Watch "Ant Command Line arguments" New topic
Author

Ant Command Line arguments

Mark Binau
Ranch Hand

Joined: Mar 04, 2004
Posts: 37
How can determine if my ant script was called with a command line argument such as -logfile? I want to be able to determine where the log file is so that I can check it into CVS. Does anyone know how to do this?

Thanks,
Mark
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I'm not sure what you're asking. Could you rephrase the question(s)?

Do you want your ant user to specify the location of something at runtime when invoking the ant script? Would simply editing a properties file be a good solution?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Mark Binau
Ranch Hand

Joined: Mar 04, 2004
Posts: 37
Sorry for my lack of clarity.

I am using ant from within WSAD 5.1. When I select Run Ant from the context menu a window comes up with several tabs. One of the tabs is titled "Main". On the Main tab is a place where I can enter command line arguments for the ant. Things such as -quite, -verbose, -debug, or -logfile. The script I am writing will be run by various developers in my group. I would like to be able to determine what logfile has been specified. If they are deploying to production, I want to store the specified log file into our CVS repository. Any ideas for how I can best accomplish this would be greatly appreciated.

Or, would it be possible to turn on logging from within the script even it was not specified on the command line? I'm looking to capture the results of the script whenever it is used to deploy to production.

Thanks,
Mark

[ August 10, 2004: Message edited by: Mark Binau ]
[ August 10, 2004: Message edited by: Mark Binau ]
 
jQuery in Action, 2nd edition
 
subject: Ant Command Line arguments
 
Threads others viewed
[Ant + Eclipse R2.0] NullPointerException accessing environment
Compiling hello world java class uing ANT on eclipse
making ant run using command line
WebSphere and Ant
Launch ant from cygwin
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com