diff --git a/project/build.scala b/project/build.scala index ff54248..39f88f4 100644 --- a/project/build.scala +++ b/project/build.scala @@ -5,6 +5,8 @@ import sbtassembly.AssemblyKeys._ import sbtassembly._ import JettyPlugin.autoImport._ +import fi.gekkio.sbtplugins.jrebel.JRebelPlugin._ +import com.earldouglas.xwp.WebappPlugin.autoImport.webappPrepare object MyBuild extends Build { val Organization = "gitbucket" @@ -77,5 +79,10 @@ testOptions in Test += Tests.Setup( () => new java.io.File("target/gitbucket_home_for_test").mkdir() ), fork in Test := true, packageOptions += Package.MainClass("JettyLauncher") + ).settings(jrebelSettings: _*).settings( + jrebel.webLinks += (target in webappPrepare).value, + jrebel.enabled := System.getenv().get("JREBEL") != null, + javaOptions in Jetty ++= Option(System.getenv().get("JREBEL")).toSeq.flatMap(path => + Seq("-noverify", "-XX:+UseConcMarkSweepGC", "-XX:+CMSClassUnloadingEnabled", s"-javaagent:${path}")) ).enablePlugins(SbtTwirl, JettyPlugin) } diff --git a/project/plugins.sbt b/project/plugins.sbt index 5ed803b..fe0d1bd 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,4 +2,5 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.0.4") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.12.0") -addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0") \ No newline at end of file +addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0") +addSbtPlugin("fi.gekkio.sbtplugins" % "sbt-jrebel-plugin" % "0.10.0")