Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
SBT plugin for Play 2 to create magenta deployable artifacts
Scala Shell

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dev
project
src/main/scala
.gitignore
README.md
sbt011

README.md

sbt-play-artifact

SBT plugin to build a magenta deployable artifact from Play 2.0.

You might also be interested in the related sbt-play-assethash

Why use this?

If you are writing a new Play 2 application and want to use magenta to deploy it then you will find that this plugin takes care of some basic tasks to create a suitable artifacts.zip file, this includes:

  • Creating one super deluxe executable JAR file using sbt-assembly
  • Bundling the JAR file and your deploy.json into an artifacts.zip
  • Ensuring that common settings are provided and common conflicts are resolved
  • Printing the magical TeamCity line to inform the CI server where the artifact is

How to use

The most convenient way of using this plugin is to add a source dependency in a scala file under project/project:

val playArtifactPluginVersion = "" // tag id you want to use
lazy val plugins = Project("plugins", file("."))
    .dependsOn(uri("git://github.com/guardian/sbt-play-artifact.git#" + playArtifactPluginVersion))

Then add artifact.Artifact.distSettings or artifact.Artifact.compileSettings in your project. distSettings includes compileSettings - the only time you might want to use only the latter is when making a common library (such as frontend-common.

  val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA)
    .settings(compileSettings: _*)

Release

To release a new version, tag it and push the tag to github.

git tag -a 1.XXX
git push --tags
Something went wrong with that request. Please try again.