Allow specifying webdefault.xml for jetty. Useful on windows for fixing file locking issue.

This commit is contained in:
tbje 2010-10-05 19:15:02 +02:00 committed by Mark Harrah
parent 1954977c98
commit ccb5141ae0
3 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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 =
{

View File

@ -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
{