I have a project that uses the xsbt-web-plugin but I want to be able to customise the jetty settings. Is there a way I can specify my own jetty.xml file? I found the
PluginKeys.configurationFiles
setting and set that to the desired file but it had no effect
You can specify a jetty.xml config file using the config
argument to jetty()
:
jetty(config = "etc/jetty.xml")
If you need to specify multiple config files, you can pass them as individual --config
arguments:
jetty(args = Seq
"--config", "jetty.xml"
, "--config", "jetty-https.xml"
, "--config", "jetty-ssl.xml"
))
Check out the docs for more info.
I use xsbt-web-plugin 2.0.2(the latest version) at present.You can do in build.sbt as following:
enablePlugins(JettyPlugin)
containerConfigFile in Compile := Some(file("./src/main/webapp/WEB-INF/jetty-env.xml"))
I hope it can be helpful for you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.