mirror of https://github.com/sbt/sbt.git
Allow specifying webdefault.xml for jetty. Useful on windows for fixing file locking issue.
This commit is contained in:
parent
1954977c98
commit
ccb5141ae0
|
|
@ -387,6 +387,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
|
||||
|
|
@ -420,6 +421,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
|
||||
|
|
|
|||
|
|
@ -58,6 +58,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 =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ trait DefaultJettyConfiguration extends JettyConfiguration
|
|||
def classpath: PathFinder
|
||||
def parentLoader: ClassLoader
|
||||
def jettyEnv: Option[File]
|
||||
def webDefaultXml: Option[File]
|
||||
}
|
||||
abstract class CustomJettyConfiguration extends JettyConfiguration
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue