Skip to content

Instantly share code, notes, and snippets.

@teigen
Created August 30, 2011 18:10
Show Gist options
  • Save teigen/1181563 to your computer and use it in GitHub Desktop.
Save teigen/1181563 to your computer and use it in GitHub Desktop.
webplugin setup suitable for jrebel (supports loading default.prop outside of directories being packaged)
import sbt._
import Keys._
import com.github.siasia.WebPlugin._
lazy val web = Defaults.defaultSettings ++ webSettings ++ Seq(
libraryDependencies ++= Seq(jetty, lift, logback),
/* add a location for development only resources */
jettyClasspaths <<= (jettyClasspaths, sourceDirectory).map((j, src) => j.copy(classpath = j.classpath +++ src / "development" / "resources")),
/* don't scan - use jrebel */
jettyScanDirs := Nil,
/* serve resources directly from source tree when running locally */
temporaryWarPath <<= (sourceDirectory in Compile)(_ / "webapp"),
/* don't publish jar */
publishArtifact in (Compile, packageBin) := false
/* publish war */
) ++ addArtifact(artifact in (Compile, packageWar), packageWar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment