Use ContainerPlugin instead of JettyPlugin to run newer version of Jetty (#3649)

This commit is contained in:
Naoki Takezoe
2024-12-01 12:49:14 +09:00
committed by GitHub
parent c009a39dd7
commit 3dcc0aee3c

View File

@@ -9,7 +9,7 @@ val JettyVersion = "10.0.24"
val JgitVersion = "6.10.0.202406032230-r"
lazy val root = (project in file("."))
.enablePlugins(SbtTwirl, ScalatraPlugin)
.enablePlugins(SbtTwirl, ContainerPlugin)
sourcesInBase := false
organization := Organization
@@ -89,7 +89,7 @@ scalacOptions ++= {
}
}
compile / javacOptions ++= Seq("-target", "11", "-source", "11")
Jetty / javaOptions += "-Dlogback.configurationFile=/logback-dev.xml"
Container / javaOptions += "-Dlogback.configurationFile=/logback-dev.xml"
// Test settings
//testOptions in Test += Tests.Argument("-l", "ExternalDBTest")
@@ -284,10 +284,12 @@ Test / testOptions ++= {
}
}
Jetty / javaOptions ++= Seq(
Container / javaOptions ++= Seq(
"-Dlogback.configurationFile=/logback-dev.xml",
"-Xdebug",
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000",
"-Dorg.eclipse.jetty.annotations.AnnotationParser.LEVEL=OFF",
// "-Ddev-features=keep-session"
)
Container / containerLibs := Seq(("org.eclipse.jetty" % "jetty-runner" % JettyVersion).intransitive())
Container / containerMain := "org.eclipse.jetty.runner.Runner"