wood burning stoves*
The moose likes IDEs, Version Control and other tools and the fly likes Passing parameters to ant build script in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Passing parameters to ant build script in Eclipse" Watch "Passing parameters to ant build script in Eclipse" New topic
Author

Passing parameters to ant build script in Eclipse

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using Eclipse 3.4 on Windows XP. When running an ant script, how do I pass in command line arguments, for example "-Denv=dev" like I would if I were running Ant through a shell script? I've tried setting an environment variable ...

http://screencast.com/t/PJiZQp0Wp

but my script is not picking that up. Any help is appreciated, - Dave
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Right-Click on the build.xml file. Select "Ant Build...". This brings up a multi-tabbed Ant run dialog.

Set the Parameters using the Parameters textarea box on the Main tab. You can also add classpath items using this dialog if you need to.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Passing parameters to ant build script in Eclipse
 
Similar Threads
What do I use instead of ANT_OPTS ?
using ant script in eclipse
Problem running ant task in Eclipse 3.4
Failed to connect to server
How do I get Eclipse to recognize my WebLogic server?