Skip to content

Instantly share code, notes, and snippets.

@dcbriccetti
Created July 25, 2011 23:09
Show Gist options
  • Save dcbriccetti/1105497 to your computer and use it in GitHub Desktop.
Save dcbriccetti/1105497 to your computer and use it in GitHub Desktop.
Trying to get war file name from SBT
object MyBuild extends Build {
import BuildSettings._
val custom = TaskKey[Unit]("custom", "Does custom processing")
val customTask = custom := {
Process("./a-script.sh %s".format(warFilePath), "a directory") !
}
}
@gseitz
Copy link

gseitz commented Jul 26, 2011

Here's what i could come up with in 5 quick minutes. If you run this with sbt, you should have a "my-task" available in the sbt shell that runs "ls -la " with the war file:
edit: github swallowed the $lessthan characters
edit2: gave up, please look at my fork: https://gist.github.com/1105498

@dcbriccetti
Copy link
Author

Thanks for your help, Gerolf!

@gseitz
Copy link

gseitz commented Jul 26, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment