Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Execute Ant script with Java file

 
Troy Archbold
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to execute an Ant script with my Java file. I also want the option of running individual targets from within the build.xml file. Can somebody give me some hints as to how this can be done?

I am using Ant 1.6.1.
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ant ant = new Ant();
ant.setProperty("item", "blahblah");
ant.setProperty("inputdir", "blahblah");
ant.setProperty("outputdir", "blahblah");
ant.setAntfile("buildhtml.xml");
ant.execute();
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!