Skip to content

Commit

Permalink
Allow specifying webdefault.xml for jetty. Useful on windows for fixi…
Browse files Browse the repository at this point in the history
…ng file locking issue.
  • Loading branch information
tbje committed Oct 5, 2010
1 parent f913d63 commit 030e2ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sbt/src/main/scala/sbt/DefaultProject.scala
Expand Up @@ -389,6 +389,7 @@ abstract class BasicWebScalaProject extends BasicScalaProject with WebScalaProje
def port = jettyPort
def log = p.log
def jettyEnv = jettyEnvXml
def webDefaultXml = jettyWebDefaultXml
}
/** This is the classpath used to determine what classes, resources, and jars to put in the war file.*/
def webappClasspath = publicClasspath
Expand Down Expand Up @@ -422,6 +423,7 @@ abstract class BasicWebScalaProject extends BasicScalaProject with WebScalaProje
def jettyPort: Int = JettyRunner.DefaultPort

def jettyEnvXml : Option[File] = None
def jettyWebDefaultXml : Option[File] = None

lazy val jettyReload = task { jettyInstance.reload(); None } describedAs(JettyReloadDescription)
lazy val jettyRestart = jettyStop && jettyRun
Expand Down
1 change: 1 addition & 0 deletions sbt/src/main/scala/sbt/WebApp.scala
Expand Up @@ -104,6 +104,7 @@ trait DefaultJettyConfiguration extends JettyConfiguration
def classpath: PathFinder
def parentLoader: ClassLoader
def jettyEnv: Option[File]
def webDefaultXml: Option[File]
}
abstract class CustomJettyConfiguration extends JettyConfiguration
{
Expand Down
1 change: 1 addition & 0 deletions sbt/src/main/scala/sbt/jetty/LazyJettyRun.scala.templ
Expand Up @@ -55,6 +55,7 @@ private object LazyJettyRun${jetty.version} extends JettyRun
import c._
configureDefaultConnector(server, port)
val webapp = new WebAppContext(war.absolutePath, contextPath)
webDefaultXml.foreach{webDefaultXml:File => webapp.setDefaultsDescriptor(webDefaultXml.toString)}

def createLoader =
{
Expand Down

0 comments on commit 030e2ee

Please sign in to comment.