ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Atkin <>
Subject Re: Example of starting ant from inside java?
Date Tue, 21 May 2002 18:02:12 GMT
the proper way is to instantiate and configure a Project - have a look 
at Ant's main wrapper
- don't know if that API changes much 1.x to 1.x though

i solved my probs by launching a separate process using 

point at ant script, pass in the parameters, read the streams and waitFor()

far from perfect, but it does mean your build runs exactly as if Ant was 
run from the command line (i had a server sharing an Ant install with 
desktop users) and will probably continue to work as 1.x versions evolve 
(if you watch the params)

it also means that Ant will have <exec> rigged for your system right and 
a whole host of other headaches that ant-dev have fathomed for us

obviously if your doing loads of builds this isn't the right route, just 
an idea...

Bob Byron wrote:

>I would like to execute an ant build from inside my Java
>program.  Can someone direct me to any documentation
>that already exists on how to do this?
>Bob Byron

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

View raw message