Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SBT plugin dependency resolution fails with com.typesafe.play#sbt-plugin;2.2.1: not found

I've a Play app and when I ran sbt, I got an error as follows:

[warn]   http://repo.typesafe.com/typesafe/releases/com/typesafe/play/sbt-plugin/2.2.1/sbt-plugin-2.2.1.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.play#sbt-plugin;2.2.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.play:sbt-plugin:2.2.1 (sbtVersion=0.13, scalaVersion=2.10)

But actually, the path of this plugin is http://repo.typesafe.com/typesafe/releases/com.typesafe.play/ rather than the failed trial http://repo.typesafe.com/typesafe/releases/com/typesafe/play.

project/plugin.sbt looks as follows:

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

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")

Please advise.

like image 839
Qiang Li Avatar asked Oct 20 '22 13:10

Qiang Li


2 Answers

The latest version of sbt plugin seems to be 2.2.0 (Migration guide says it) so change your plugins.sbt like this:

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

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.0")
like image 89
serejja Avatar answered Jan 02 '23 20:01

serejja


The play plugin is distributed as an ivy artifact, not a maven one. You need the following:

resolvers += Resolver.typesafeIvyRepo("releases")

addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")

See the contents here: http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/

Please note that the latest version of Play (and hence the plugin) is 2.2.2.

like image 40
3 revs, 2 users 80% Avatar answered Jan 02 '23 20:01

3 revs, 2 users 80%