Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Could not retrieve sbt 0.11.3 when running existing project in Play 2.1.0?

I'm new to Play Framework. I've just read about how to create and run a play project. I've been given a project and am facing Error: Could not retrieve sbt 0.11.3:

Getting org.scala-sbt sbt 0.11.3 ...

:: problems summary ::
:::: WARNINGS
        module not found: org.scala-sbt#sbt;0.11.3

    ==== local: tried

      /home/ritesh/Play/play-2.1.0/repository/local/org.scala-sbt/sbt/0.11.3/ivys/ivy.xml

    ==== Maven2 Local: tried

      file:///home/ritesh/.m2/repository/org/scala-sbt/sbt/0.11.3/sbt-0.11.3.pom

    ==== typesafe-ivy-releases: tried

      http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.11.3/ivys/ivy.xml

    ==== Maven Central: tried

      http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.11.3/sbt-0.11.3.pom

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::          UNRESOLVED DEPENDENCIES         ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: org.scala-sbt#sbt;0.11.3: not found

        ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.11.3: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/ritesh/Play/play-2.1.0/framework/sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.11.3

I only installed Play Framework 2.1.0 distribution and nothing else.

How can I get passed the error and execute the play command successfully?

like image 834
Ritesh Mehandiratta Avatar asked Feb 20 '13 20:02

Ritesh Mehandiratta


2 Answers

I think your existing project has dependencies to sbt 0.11.3 and you are running it with Play 2.1.0 which uses sbt 0.12.2.

Check the file build.properties located under the project folder. If it says 0.11.3 your project probably uses another Play version and need to be upgraded to 2.1.0.
The sbt-plugin should have Play 2.1.0 assigned - se plugins.sbt under project folder.

Either ugrade your project: http://www.playframework.com/documentation/2.1.0/Migration

Or - switch to an older Play version - the correct for your project. => http://www.playframework.com/download.

like image 142
javaHelena Avatar answered Oct 22 '22 12:10

javaHelena


It seems you're using play 2.1.0 which is distributed with sbt 0.12.2.

The solution is not to upgrade your play distribution as you only need to edit your project/build.properties file and change

sbt.version=0.11.3

to

sbt.version=0.12.2

With the change, the project should be fine.

like image 6
Olofu Mark Avatar answered Oct 22 '22 10:10

Olofu Mark