buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pepijn Van Eeckhoudt <>
Subject Re: Buildr terminates after RJB invocation
Date Wed, 08 Apr 2015 09:44:48 GMT
Ant’s Main class calls System.exit and RJB starts the JavaVM within the Ruby process, not
as a subprocess, so Ant ends up terminating the entire process. Simplest fix is to run Ant
as a subprocess instead of in-process I think.
Alternative solution from an SO answer (
is to subclass Ant’s Main and override its exit method to be a noop.

Best regards,


> On 08 Apr 2015, at 09:44, Ander Juaristi <> wrote:
> Hi,
> I've got a legacy ant script called deploy.xml, and I'm running it through a Buildr buildfile,
like this:
>['-buildfile', 'deploy.xml'])
> So far it runs OK, but there are a bunch of Ruby lines after it that don't get executed.
The whole Buildr process seems to terminate after the Ant invocation completes.
> I've tried using a separate thread, but nothing changes:
>    t = {
>['-buildfile', 'deploy.xml'])
>    }
>    t.join
> Finally, I've gone through AntWrap (, but looking at the
documentation, it does not seem to be able to run legacy Ant scripts. At least, in a straightforward
> Thoughts?
> -- 
> Regards,
> - AJ

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