Created
July 7, 2010 08:20
-
-
Save tbje/466462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jetty6 imports | |
import org.mortbay.jetty.webapp.{WebAppClassLoader, WebAppContext, WebInfConfiguration, Configuration, FragmentConfiguration, JettyWebXmlConfiguration, TagLibConfiguration, WebXmlConfiguration} | |
import org.mortbay.xml.XmlConfiguration | |
import org.mortbay.jetty.plus.webapp.{EnvConfiguration, Configuration=>PlusConfiguration} | |
// jetty7 imports | |
import org.eclipse.jetty.webapp.{WebAppClassLoader, WebAppContext, WebInfConfiguration, Configuration, FragmentConfiguration, JettyWebXmlConfiguration, TagLibConfiguration, WebXmlConfiguration} | |
import org.eclipse.xml.XmlConfiguration | |
import org.eclipse.jetty.plus.webapp.{EnvConfiguration, Configuration=>PlusConfiguration} | |
// ... | |
val webapp = new WebAppContext(war.absolutePath, contextPath) | |
// ... | |
val envConfig = new EnvConfiguration | |
envConfig.setJettyEnvXml(jettyEnvFile.toURL) | |
val confArray : Array[Configuration] = Array( | |
new WebInfConfiguration, | |
new WebXmlConfiguration, | |
envConfig, | |
new PlusConfiguration, | |
new JettyWebXmlConfiguration, | |
new TagLibConfiguration | |
) | |
webapp.setConfigurations(confArray) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyProject(info: ProjectInfo) extends DefaultWebProject(info){ | |
<!-- Your dependencies here --> | |
val jetty7WebApp = "org.eclipse.jetty" % "jetty-webapp" % "7.0.2.RC0" % "test" | |
val jetty7Server = "org.eclipse.jetty" % "jetty-server" % "7.0.2.RC0" % "test" | |
val jetty7Plus = "org.eclipse.jetty" % "jetty-plus" % "7.0.2.RC0" % "test" | |
<!-- Path to jetty-env.xml --> | |
override def jettyEnvXml = Some( | |
(sourcePath / "main" / "jetty" / "jetty-env.xml").asFile | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment