buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grotzke <>
Subject How to run task in background
Date Fri, 10 Jul 2009 10:17:50 GMT

I have another one :)

I want to start a mailserver with test.setup so that it's available for

I created a task that starts a simple java mail server which blocks
until it's interrupted. Now I wonder how it's possible to run this in
the background during the tests.

This is the task:

  desc "Start mailserver on unprivileged ports"
  task "run-mailserver" do
    begin'com.ericdaugherty.mail.server.Mail', _('runtime/mailserver'),
        :classpath => ['runtime/mailserver/lib', FileList['runtime/mailserver/lib/*.jar']]
    rescue Exception
      # this is excepted, as java probably was interrupted via CTRL-C
Is it possible somehow to run this in the background during the tests? I
had a look at the jetty stuff, but there the lifecycle is managed via
URL communication... 

Thanx && cheers,

View raw message