Skip to content

Instantly share code, notes, and snippets.

@gseitz
Forked from dcbriccetti/gist:1105497
Created July 25, 2011 23:10
Show Gist options
  • Save gseitz/1105498 to your computer and use it in GitHub Desktop.
Save gseitz/1105498 to your computer and use it in GitHub Desktop.
Trying to get war file name from SBT
import sbt._
import Keys._
import com.github.siasia.{WebPlugin=>WP}
object MyBuild extends Build {
val myTask = TaskKey[Unit]("my-task")
lazy val myProject = Project("webproject", file("."), settings =Defaults.defaultSettings ++
WP.webSettings ++ Seq[Setting[_]](
myTask <<= (streams, target, scalaVersion, projectID, artifact in WP.packageWar) map (
(out, t, sv, p, a) => "ls -la " + new File(t, Artifact.artifactName(sv, p, a)).getAbsolutePath ! out.log)
))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment