add jrebel plugin

This commit is contained in:
nazoking
2016-01-03 22:09:52 +09:00
parent a3b3262ad5
commit 1042c50cc3
2 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ import sbt._
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 @@ object MyBuild extends Build {
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)
}

View File

@@ -2,4 +2,5 @@ scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature")
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")
addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "2.1.0")
addSbtPlugin("fi.gekkio.sbtplugins" % "sbt-jrebel-plugin" % "0.10.0")