Search code examples
sbtdependency-managementivyplayframework-2.4

SBT does not resolve all dependencies for PlayFramework 2.4.2


I tried setting up a new Play Framework 2.4.2 project according to the instructions but I'm getting unresolved dependencies error from seemingly common libraries.

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: oauth.signpost#signpost-core;1.2.1.2: configuration not found in oauth.signpost#signpost-core;1.2.1.2: 'master(compile)'. Missing configuration: 'compile'. It was required from com.typesafe.play#play-ws_2.11;2.4.2 compile
[warn]  :: commons-logging#commons-logging;1.1.1: configuration not found in commons-logging#commons-logging;1.1.1: 'master(compile)'. Missing configuration: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.0.1 compile
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          oauth.signpost:signpost-core:1.2.1.2
[warn]            +- oauth.signpost:signpost-commonshttp4:1.2.1.2
[warn]            +- com.typesafe.play:play-ws_2.11:2.4.2 (D:\work\my-app\build.sbt#L9-15)
[warn]            +- my-app:my-app_2.11:1.0-SNAPSHOT
[warn]          commons-logging:commons-logging:1.1.1
[warn]            +- org.apache.httpcomponents:httpclient:4.0.1
[warn]            +- oauth.signpost:signpost-commonshttp4:1.2.1.2
[warn]            +- com.typesafe.play:play-ws_2.11:2.4.2 (D:\work\my-app\build.sbt#L9-15)
[warn]            +- my-app:my-app_2.11:1.0-SNAPSHOT

My plugins.sbt looks like

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

// The Play plugin
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.2")

// web plugins

addSbtPlugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.6")

addSbtPlugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3")

addSbtPlugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7")

addSbtPlugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0")

My build.sbt looks like

name := """my-app"""

version := "1.0-SNAPSHOT"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
  jdbc,
  cache,
  ws,
  specs2 % Test
)

resolvers += "scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"

// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator

And build.properties

#Activator-generated Properties
#Thu Oct 22 21:22:58 CEST 2015
template.uuid=fce2d244-c545-409f-806e-7a0c3681b306
sbt.version=0.13.8

To me everything seems correct but for some reasons these dependencies required by com.typesafe.play:play-ws_2.11:2.4.2 do not resolve.


Solution

  • The solution was to open my %USERPROFILE%\.ivy2\cache and delete commons-logging and oauth.signpost folders from there.

    Thanks to this answer https://stackoverflow.com/a/28456949/410568