File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameters to ant build script in Eclipse

 
Dave Alvarado
Ranch Hand
Posts: 436
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic