Skip to content

Instantly share code, notes, and snippets.

@virasak
Created April 4, 2010 13:45
Show Gist options
  • Save virasak/355404 to your computer and use it in GitHub Desktop.
Save virasak/355404 to your computer and use it in GitHub Desktop.
require 'buildr/jetty'
require 'readline'
define "webapp" do
....
task("jetty"=>[package(:war), jetty.use]) do |task|
jetty.deploy("http://localhost:8080", task.prerequisites.first)
Readline::readline('[Type ENTER to stop Jetty]')
end
end
puts 'Press CTRL-C to stop Jetty'
trap 'SIGINT' do
jetty.stop
end
Thread.stop
require 'buildr/jetty'
define "webapp" do
....
task("deploy-app"=>[package(:war), jetty.use]) do |task|
class << task ; attr_accessor :url, :path ; end
task.url = "http://localhost:8080"
task.path = jetty.deploy(task.url, task.prerequisites.first)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment