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.



90
91
92
93
94
# File 'lib/warbler/web_server.rb', line 90

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



96
97
98
99
100
101
102
103
104
105
# File 'lib/warbler/web_server.rb', line 96

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