Hi,

our project contains several subprojects. Two of them I want to run with
jetty, both instances shall be running at the same time.

To change the port for one of the instances, I use
  jetty.url = "http://localhost:8090";
in the context of one subproject, but this seems to change also the url
for the jetty task defined in the different subproject.

That's how I define the jetty tasks:

define "myproj" do

  define "subprojA" do
    ...
    task("jetty"=>[package(:war), jetty.use]) do |task|
      jetty.deploy("http://localhost:8080";, task.prerequisites.first)
      puts 'Press CTRL-C to stop Jetty'
      trap 'SIGINT' do
        jetty.stop
      end
      Thread.stop
    end

  end

  define "subprojB" do

    jetty.url = "http://localhost:8090";
    task("jetty"=>[package(:war), jetty.use]) do |task|
      jetty.deploy("http://localhost:8090";, task.prerequisites.first)
      puts 'Press CTRL-C to stop Jetty'
      trap 'SIGINT' do
        jetty.stop
      end
      Thread.stop
    end

  end

end

When I run the first jetty with
  buildr myproj:subprojA
it fails with
...
Starting Jetty at http://localhost:8090
1 [main] INFO org.mortbay.log - Logging to 
org.slf4j.impl.SimpleLogger(org.mortbay.log) via org.mortbay.log.Slf4jLog
15 [main] INFO org.mortbay.log - jetty-6.1.3
74 [main] INFO org.mortbay.log - Started SocketConnector @ 0.0.0.0:8090
Jetty started
Buildr aborted!
Connection refused - connect(2)


Is it somehow possible to run several jetty instances for different
subprojects?


Thanx && cheers,
Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to