This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Calling ANT task from Java program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Calling ANT task from Java program" Watch "Calling ANT task from Java program" New topic
Author

Calling ANT task from Java program

Yash Sharma
Ranch Hand

Joined: Jan 30, 2003
Posts: 61
Sorry if this sounds naive I want to use the ?Freemarker ANT task to generate an HTML representation for my XML based on a template. However I want to do this using my program on the fly, which means that I must be able to call the ANT task from inside my Java program.

Can we call an ANT task from a Java Program or JSP?
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
In Ant documentation that ships with it, refer to the section
'Using Ant Tasks Outside of Ant'. We have used some ant tasks from within our java code and its very easy to use.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling ANT task from Java program