Class: Warbler::JettyServer

Inherits:
WebServer show all
Defined in:
lib/warbler/web_server.rb

Instance Method Summary collapse

Methods inherited from WebServer

#main_class

Constructor Details

#initializeJettyServer

Returns a new instance of JettyServer.


75
76
77
78
79
# File 'lib/warbler/web_server.rb', line 75

def initialize
  @artifact = Artifact.new(ENV["MAVEN_REPO"] || "http://repo2.maven.org/maven2",
                           "org.jruby.warbler", "warbler-embedded-jetty",
                           ENV["WEBSERVER_VERSION"] || "1.0.0")
end

Instance Method Details

#add(jar) ⇒ Object


81
82
83
84
85
86
87
88
89
90
# File 'lib/warbler/web_server.rb', line 81

def add(jar)
  super
  jar.files["WEB-INF/webserver.properties"] = StringIO.new(<<-PROPS)
mainclass = JettyWarMain
args = args0
props = jetty.home
args0 = {{warfile}}
jetty.home = {{webroot}}
PROPS
end