Why can't SBT find the Play 2.1 plugin?

In my plugins.sbt file, I have

 scalaVersion := "2.10.0" resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/" addSbtPlugin("play" % "sbt-plugin" % "2.1") 

When I try to run sbt , I get, among other things,

 [warn] ==== Typesafe repository: tried [warn] http://repo.typesafe.com/typesafe/releases/play/sbt-plugin_2.10_0.12/2.1/sbt- plugin-2.1.pom [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/play/sbt-plugin_2.10_0.12/2.1/sbt-plugin-2.1.pom [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: play#sbt-plugin;2.1: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] [warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. [warn] play:sbt-plugin:2.1 (sbtVersion=0.12, scalaVersion=2.10) [warn] sbt.ResolveException: unresolved dependency: play#sbt-plugin;2.1: not found 

Why can't SBT find the plugin? I also tried addSbtPlugin("play" % "sbt-plugin" % "2.1-RC1") with similar results.

+8
source share
2 answers

The problem was that the scalaVersion parameter was set in the plugins.sbt file. This causes sbt to look for sbt-plugin_2.10.0_0.12 in the repositories when it should really look for sbt-plugin_2.9.2_0.12.

I'm not sure about the semantics that indicate scalaVersion in the plugins.sbt file, but maybe it declares the Scala version that SBT is working on.

Here is a link to the Sbt-plugin files for Play 2.1: http://repo.typesafe.com/typesafe/simple/ivy-releases/play/sbt-plugin/scala_2.9.2/sbt_0.12/2.1-RC1/srcs/

+4
source share

According to the documentation, add this to your project/plugins.sbt :

 addSbtPlugin("play" % "sbt-plugin" % "2.1.0") 

Modify project/build.properties

 sbt.version=0.12.2 
+1
source share

All Articles