[英]Why does inspect compile:packageWar::packagedArtifact fail in the Sbt console when using xsbt-web-plugin?
[英]SBT does not propagate changes in webapp when using xsbt-web-plugin and JRebel
设置如下:
我的静态Web文件(html等)位于/src/webapp
我跑
# sbt
> jetty:start
> ~compile
问题:即使认为SBT检测到静态文件以及JRebel日志(也表明它们也看到了)中的更改,这些更改也不会传播到/target/webapp
。 重新编译和重新加载scala文件效果很好。
build.sbt
organization := "serendipity"
name := "story-telling"
version := "1.0"
scalaVersion := "2.11.8"
libraryDependencies ++= {
val liftVersion = "3.0-RC3"
Seq(
"net.liftweb" %% "lift-webkit" % liftVersion % "compile",
"net.liftweb" %% "lift-mapper" % liftVersion % "compile",
"org.eclipse.jetty" % "jetty-webapp" % "9.3.13.v20161014",
"com.h2database" % "h2" % "1.4.193"
)
}
enablePlugins(JettyPlugin)
seq(jrebelSettings: _*)
jrebel.webLinks += (sourceDirectory in Compile).value / "webapp"
jrebel.classpath <<= Seq(Keys.classDirectory in Compile).join
jrebel.enabled := true
javaOptions in Jetty ++= Seq(
"-javaagent:/opt/jrebel/jrebel.jar",
"-noverify",
"-XX:+UseConcMarkSweepGC",
"-XX:+CMSClassUnloadingEnabled",
"-Drebel.log=debug",
"-Drebel.log.file=/home/anton/.jrebel/jrebel.log"
)
只需运行:
> jetty:start
> ~compile
据我了解,这是一种解决方法,而不是适当的解决方案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.