Skip to content

Instantly share code, notes, and snippets.

@aolshevskiy
Created June 19, 2011 13:48
Show Gist options
  • Save aolshevskiy/1034298 to your computer and use it in GitHub Desktop.
Save aolshevskiy/1034298 to your computer and use it in GitHub Desktop.
Sbt plugin depending on the web plugin
seq(scriptedSettings :_*)
scriptedBufferLog := false
organization := "com.example"
name := "depending-plugin"
version := "0.1-SNAPSHOT"
sbtPlugin := true
libraryDependencies += "com.github.siasia" %% "xsbt-web-plugin" % "0.1-SNAPSHOT"
resolvers += Resolver.url("Typesafe repository", new java.net.URL("http://typesafe.artifactoryonline.com/typesafe/ivy-releases/"))(Resolver.defaultIvyPatterns)
libraryDependencies <+= sbtVersion("org.scala-tools.sbt" %% "scripted-plugin" % _)
seq(dependingSettings :_*)
libraryDependencies += "com.example" %% "depending-plugin" % "0.1-SNAPSHOT"
import sbt._
import WebPlugin._
object DependingPlugin extends Plugin {
val depending = TaskKey[Unit]("depending")
def dependingTask = (packageWar) map { (war) => println(war) }
val dependingSettings: Seq[Project.Setting[_]] = webSettings ++ Seq(
depending <<= dependingTask
)
}
> depending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment