Class: Warbler::WinstoneServer

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

Direct Known Subclasses

JenkinsWinstoneServer

Instance Method Summary collapse

Methods inherited from WebServer

#main_class

Constructor Details

#initializeWinstoneServer

Returns a new instance of WinstoneServer.


48
49
50
51
52
# File 'lib/warbler/web_server.rb', line 48

def initialize
  @artifact = Artifact.new(ENV["MAVEN_REPO"] || "http://repo2.maven.org/maven2",
                           "net.sourceforge.winstone", "winstone-lite",
                           ENV["WEBSERVER_VERSION"] || "0.9.10")
end

Instance Method Details

#add(jar) ⇒ Object


54
55
56
57
58
59
60
61
62
63
# File 'lib/warbler/web_server.rb', line 54

def add(jar)
  super
  jar.files["WEB-INF/webserver.properties"] = StringIO.new(<<-PROPS)
mainclass = winstone.Launcher
args = args0,args1,args2
args0 = --warfile={{warfile}}
args1 = --webroot={{webroot}}
args2 = --directoryListings=false
PROPS
end