ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: launch Ant from Java code
Date Thu, 13 Jan 2011 13:26:43 GMT
On 1/13/2011 2:57 AM, Patrick Martin wrote:
> Thank you Antoine,
>
> I do have a follow-up question on this though. Will this be thread
> safe? Is it possible to run two targets in parallel from Java code,
> without any interactions (different projects, property sets and so
> on)?
Ant has a parallel task, and I am running build scripts with some 
parallelism inside them (for instance to run different JUnit suites in 
parallel).
Running different projects in parallel should work. You should make a 
prototype and see how it goes. If you find errors ping the list and/or 
create bug reports.
> I am especially afraid of the system properties which may be shared
> and set/read from parallel ant projects.
System properties are really handles by Java and they are shared in a 
JVM. So if your different projects rely on different system properties 
then in fact you need to fork them.
> I'd also be interested in running ant tasks in parallel on *different*
> versions of Ant (for script migrations purposes), which would probably
> lead to using different class loaders. Is that something feasible?
I have never tried.
Wrapping ant inside an OSGi bundle could address your need. You could 
create a bundle for say ant 1.6.x and another for ant 1.8.x, and have 
these bundles export a project build service.

> Thanks again,
>
> Patrick
>
Regards,

Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message