繁体   English   中英

使用xsbt-web-plugin和JRebel时,SBT不会在webapp中传播更改

[英]SBT does not propagate changes in webapp when using xsbt-web-plugin and JRebel

设置如下:

  • 提升网
  • xsbt-web-plugin
  • sbt-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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM