user11664462
user11664462

Reputation:

Could not find com.typesafe.play in play framework

I'm new to play framework. I'm trying to build an old project of my company (i'm a intern). Here is the log

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find com.typesafe.play:play-java-2.12:2.6.6.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/com/typesafe/play/play-java-2.12/2.6.6/play-java-2.12-2.6.6.pom
       - https://jcenter.bintray.com/com/typesafe/play/play-java-2.12/2.6.6/play-java-2.12-2.6.6.pom
       - https://repo.lightbend.com/lightbend/maven-releases/com/typesafe/play/play-java-2.12/2.6.6/play-java-2.12-2.6.6.pom
       - https://repo.lightbend.com/lightbend/ivy-releases/com.typesafe.play/play-java-2.12/2.6.6/ivys/ivy.xml
     Required by:
         project :

My code in build.gradle (my company use gradle instead of sbt)

compile group: "com.typesafe.play", name: "play_$scalaVersion", version: "$playVersion"
compile group: "com.typesafe.play", name: "routes-compiler_$scalaVersion", version: "$playVersion"
...

I tried to click on those links in the logs but most of them show 404 error code. Please help.

Upvotes: 0

Views: 343

Answers (1)

Magnilex
Magnilex

Reputation: 11958

There seems to be a typo for the dependency. It is not named play-java-2.12, but play-java_2.12 (notice the underscore). You are getting the 404 error code since the URL does not exist, but changing it to the correct URL works:

https://repo.maven.apache.org/maven2/com/typesafe/play/play-java_2.12/2.6.6/

So simply change the name of the dependency from play-java-2.12 to play-java_2.12 should do it.

Upvotes: 1

Related Questions