The moose likes Ant, Maven and Other Build Tools and the fly likes Using ANT API in Java Program 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 "Using ANT API in Java Program" Watch "Using ANT API in Java Program" New topic
Author

Using ANT API in Java Program

Srinivas Ivaturi
Ranch Hand

Joined: Jan 28, 2003
Posts: 50
Hi
I came to know that we can use Ant API in Java Programming to make the Dyanamic WAR creation. The scenario is like this -->
I have to select set of files and create some XML documents online and make them as WAR. I could able to make all of the above except WAR file generation.
I need some help how can I make use of ANT API in Java Program (A Servlet may be) to create a dynamic WAR file on the fly.

Thanks for your time and help in advance
Srinivas Ivaturi.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
You can reuse any of the Ant classes (check out the Ant API docs). It even has documentation detailing how to integrate Ant into your own applications. So, be sure to read the Ant documentation!


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4312

We've got a whole forum dedicated to Ant (and other build tools), so I'm moving this over there.
 
 
subject: Using ANT API in Java Program
 
Threads others viewed
.war
unable to create War using Ant
WAR file creation using Ant in Java Program
Creating WAR file using JAVA API
How to automate deployment of war in Tomcat through Ant
developer file tools