How to import Play framework as a dependency in Scala project

I forked btce-scala, so I can work on a trading bot. I'm cleaning up this library by adding the normal sbt project structure, making a build.sbt, etc:

~/code/scala/btce-scala) cat build.sbt
name := "btce-scala"

version := "0.1"

resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"

scalaVersion := "2.10.3"

libraryDependencies ++= Seq(
    "net.liftweb" % "lift-json_2.9.1" % "2.6-M2",
    "org.specs2" %%  "specs2" % "2.3.8" % "test",
    "joda-time" % "joda-time" % "2.3",
    "org.joda" % "joda-convert" % "1.6",
    "commons-codec" % "commons-codec" % "1.9",
    "com.typesafe.play" % "play_2.2.2" % "2.2.2"
)

My problem is that I'm not sure how to import the latest version of Play framework. I need it to use play.api.libs.ws.WS.

~/code/scala/btce-scala 🚀  sbt run
[info] Set current project to btce-scala (in build file:/Users/bryangarza/code/scala/btce-scala/)
[info] Updating {file:/Users/bryangarza/code/scala/btce-scala/}btce-scala...
[info] Resolving com.typesafe.play#play_2.2.2;2.2.2 ...
[warn]  module not found: com.typesafe.play#play_2.2.2;2.2.2
[warn] ==== local: tried
[warn]   /Users/bryangarza/.ivy2/local/com.typesafe.play/play_2.2.2/2.2.2/ivys/ivy.xml
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/play/play_2.2.2/2.2.2/play_2.2.2-2.2.2.pom
[warn] ==== Typesafe Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/play/play_2.2.2/2.2.2/play_2.2.2-2.2.2.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#play_2.2.2;2.2.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.2.2;2.2.2: not found

...

[error] (*:update) sbt.ResolveException: unresolved dependency: com.typesafe.play#play_2.2.2;2.2.2: not found

Obviously this is because it can't find Play_2.2.2, but where can I find this repo so I can add it to sbt?

Answers


Your dependency is wrong. Use this instead:

libraryDependencies ++= Seq("com.typesafe.play" %% "play" % "2.2.2")

Need Your Help

Getting item price from Amazon python API

python amazon amazon-product-api

I am new to amzon api and I am trying to print the attributes of items returned from the below code. .

Python Unicode ajax form posting error

python django

i got a n00b problem with python and i've been searching here for a while and i couldnt find a proper solution...