If you already have sbt
installed I find it easier to create a minimal Play project without activator
. Here's how.
# create a new folder
mkdir myNewProject
# launch sbt
sbt
When previous steps are completed, edit build.sbt
and add the following lines
name := """myProjectName"""
version := "1.0-SNAPSHOT"
offline := true
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.6"
# add required dependencies here .. below a list of dependencies I use
libraryDependencies ++= Seq(
jdbc,
cache,
ws,
filters,
specs2 % Test,
"com.github.nscala-time" %% "nscala-time" % "2.0.0",
"javax.ws.rs" % "jsr311-api" % "1.0",
"commons-io" % "commons-io" % "2.3",
"org.asynchttpclient" % "async-http-client" % "2.0.4",
cache
)
resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
resolvers ++= Seq("snapshots", "releases").map(Resolver.sonatypeRepo)
resolvers += "Typesafe Releases" at "http://repo.typesafe.com/typesafe/maven-releases/"
Finally, create a folder project
and inside create a file build.properties
with the reference to the version of Play you would like to use
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.3")
That's it! Your project is ready. You can launch it with sbt
. From within sbt
you have access to the same commands as with activator
.