ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manju Sarala Viswam <>
Subject RE: Executing an Ant build from a Java class
Date Fri, 27 Jun 2003 03:45:17 GMT
Hi ,
        You can try this :
1.Create ur build.xml and compile and run the following program.



public class RunningAnt extends Ant
        public RunningAnt()
                project = new Project();
                taskType = "ant";
                taskName = "ant";
                setDir(new File("D:\\rtf\\"));

        public static void main (String []args){
                System.out.println("In main");

                RunningAnt Ra = new RunningAnt();


Ant Api's are available with the ant documentation .

Hope I have answered your question 


Manju S Viswam

-----Original Message-----
From: Richard Hill [
<> ]
Sent: Friday, June 27, 2003 7:49 AM
To: ''
Subject: Executing an Ant build from a Java class

I'm building a web application using jsp/servlets/struts that will allow a
user to kick off an Ant build script with whatever -Dparams needed. How do
you execute an Ant build in a java class?

Richard Hill

To unsubscribe, e-mail:
For additional commands, e-mail:

The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this message
by anyone else is unauthorized. If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message in


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message