Looking quickly at the Ant Main source code reveals it's using
System.exit() and therefore killing the JVM upon exit.
https://github.com/apache/ant/blob/trunk/src/main/org/apache/tools/ant/Main.java

You may have to either subclass Main and override the exit() method or fork
the process to execute ant.

e.g.  java('org.apache.tools.ant.Main', '-file', 'build.xml',
'package', :classpath
=> Ant.dependencies)

alex

On Tue, Jan 22, 2013 at 4:05 AM, Ed O'Loughlin <[email protected]>wrote:

> Hi,
>
> I'm using buildr to wrap the generation of a library (
> http://jspeex.sourceforge.net/), which uses Ant as its own build tool. I
> use
>
>   Java.org.apache.tools.ant.Main.main(['-file', 'build.xml', 'package'])
>
> To run the 'package' target in the Ant project. This completes but buildr
> exits with a zero exit code after running this line. Nothing that follows
> this in my buildfile is executed.
>
> Any ideas?
>
> Thanks,
> Ed O'Loughlin
>

Reply via email to