1
votes

I'm banging my head against the wall on this one.

Trying to open a cloned git SBT project at work. It is a combined Java and Scala Play project, with scala 2.11.1, SBT 0.13.6, and Play 2.5.

I use IntelliJ to import project from the cloned repo, with JDK 1.8, and all download and SBT checkboxes checked, and then run either SBT refresh, or reload from SBT shell.

After doing so, all SBT and Play code on both build.sbt and plugins.sbt is painted red, as in "cannot resolve symbol".

Looking at Intellij poroject structure, I have JDK1.8 on the SDK tab, and scala-sdk-2.11 on the Global Libraries tab. SBT and Scala plugins are installed and enabled.

SBT refresh fails on the following Play dependency, which could be the reason for the above symptom, since the SBT build does not complete:

unresolved dependency: com.typesafe.play.plugins#play-statsd_2.11;2.3.0: not found

The dependency does exist: http://dl.bintray.com/typesafe/maven-releases/com/typesafe/play/plugins/play-statsd_2.11/2.3.0/

What am I doing wrong?

enter image description here

4
Can you please share dependency for Play StatsD. Which version of Play StatsD has been used in build.sbt?KZapagol
There is no such dependency in build.sbtDondey

4 Answers

1
votes

Turns out the problem is on the typesafe side, not on my env. All typesafe dependencies on the project are resolved as expected, except for play-statsd.

I manually added this dependency to my ivy cache, and now everything works fine. It was a hard one to isolate, because apparently everybody here already have the dependency on their caches, so seems like their updates work well...

If anyone has the same problem, fetch the dependency from the bintray repository, and manually add it to your ivy cache, e.g.

~/.ivy2/cache/com.typesafe.play.plugins/play-statsd_2.11

The github play-plugins repository has been archived, so I can't open an issue, and don'y know if anyone will take care of it anyway.

0
votes

Unresolved dependency error usually related with Scala version that you are using.

Here is Play 2.3.x documentation. https://www.playframework.com/documentation/2.3.x/Migration22#Update-Scala-version

If you are able to use Play 2.7.x, your issue will be fixed.

0
votes

Could you please add Play StatsD dependency in build.sbt as below and check once.

"com.typesafe.play.plugins" %% "play-statsd" % "2.3.0"

0
votes

You should add maven-releases resolver:

resolvers += "Typesafe Resolver" at "http://repo.typesafe.com/typesafe/maven-releases/"