buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Assaf Arkin <ar...@intalio.com>
Subject Re: java gem Buildr system.exit(0)
Date Tue, 19 May 2009 22:20:06 GMT
On Tue, May 19, 2009 at 1:24 AM, Klaas Prause <kp@blau.de> wrote:

> Hi,
>
>
>
> I try to integrate Buildr with Ivy and have one problem that prevents the
> termination of the buildr process after the build process finished. A good
> description is in this bug report:
>
> https://issues.apache.org/jira/browse/IVY-1075
>
> and this feature request:
>
> https://issues.apache.org/jira/browse/IVY-1077
>
>
>
> The short summary is that the jsch library used inside Ivy to connect to
> remote repositories via SSH keeps a connection open to speed up the
> communication. The connection prevents the VM to terminate. Two solutions:
>
> 1. close the session manually (as requested in Ivy-1077)
>
> 2. call System.exit(0) when terminating the buildr script
>
>
>
> Is it possible for the java buildr gem to call System.exit(0) automatically
> when a build terminates without errors or is that a problem maybe because
> buildr supports the creation of deamon threads so that the handling must be
> explicit?


Handling must be explicit. You can probably use an at_exit hook (when Ruby
terminates) or if that doesn't work, register callbacks
(Buildr.application.on_completion & on_failure) so you can close Ivy
connections at the end of the build. You can also call System.exit if you
want with the caveat that it might interfere with certain tasks (e.g.
Jetty).

Assaf


>
>
>
>
> Regards Klaas
>
>
>
>
>
>
>
>
>
>
>
>
>
>

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