设置如下:
我的静态网络文件(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"
)
答案 0 :(得分:0)
改为运行:
> jetty:start
> ~compile
据我所知,这是一种解决方法,而不是正确的解决方案