buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Klaas Prause" ...@blau.de>
Subject AW: java gem Buildr system.exit(0)
Date Wed, 20 May 2009 07:28:55 GMT
Thank you very much, the hooks for buildr work perfectly and are a very good think to integrate
in the extension. I am using now both hooks (Buildr.application.on_completion & on_failure)
as suggested and it works like a charm :)

Regards Klaas

-----Urspr√ľngliche Nachricht-----
Von: Assaf Arkin [mailto:arkin@intalio.com] 
Gesendet: Mittwoch, 20. Mai 2009 00:20
An: users@buildr.apache.org
Betreff: Re: java gem Buildr system.exit(0)

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
View raw message