【问题标题】:SBT does not propagate changes in webapp when using xsbt-web-plugin and JRebel使用 xsbt-web-plugin 和 JRebel 时,SBT 不会在 webapp 中传播更改
【发布时间】:2017-03-17 12:55:52
【问题描述】:

设置如下:

  • 提升网
  • xsbt-web-plugin
  • sbt-jrebel-插件
  • JRebel

我的静态网页文件(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"
  )

【问题讨论】:

    标签: scala sbt lift jrebel xsbt-web-plugin


    【解决方案1】:

    只需运行:

    > jetty:start
    > ~compile
    

    据我了解,这是一种解决方法,而不是正确的解决方案

    【讨论】:

      猜你喜欢
      • 2014-06-13
      • 1970-01-01
      • 1970-01-01
      • 2014-12-17
      • 1970-01-01
      • 2012-06-11
      • 2015-05-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多