I am trying to include the dependencies for creating a jersey client in a play framework (2.2.4 - java) application. I am using JDK 1.7 to run the application.
The application works fine when I run the code (using play run
) or create a build (using play dist
) on my local system (windows). However, when I try to create the build on the server (ubuntu), the build task fails with the following error.
[warn] module not found: org.glassfish.hk2#hk2-locator;2.26-b09
[warn] ==== local: tried
[warn] /opt/play-2.2.4/repository/local/org.glassfish.hk2/hk2-locator/2.26-b09/ivys/ivy.xml
[warn] ==== Maven2 Local: tried
[warn] file:/root/.m2/repository/org/glassfish/hk2/hk2-locator/2.26-b09/hk2-locator-2.26-b09.pom
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/glassfish/hk2/hk2-locator/2.26-b09/hk2-locator-2.26-b09.pom
[warn] ==== Typesafe Releases Repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/org/glassfish/hk2/hk2-locator/2.26-b09/hk2-locator-2.26-b09.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.glassfish.hk2#hk2-locator;2.26-b09: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] (*:update) sbt.ResolveException: unresolved dependency: org.glassfish.hk2#hk2-locator;2.26-b09: not found
I have included the dependencies as follows in the Build.scala file:
"javax.ws.rs" % "javax.ws.rs-api" % "2.1",
"org.glassfish.jersey.inject" % "jersey-hk2" % "2.26-b09",
"org.glassfish.hk2.external" % "javax.inject" % "2.5.0-b42",
"org.glassfish.jersey.core" % "jersey-client" % "2.26-b09",
"org.glassfish.jersey.core" % "jersey-common" % "2.26-b09",
"org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.26"
In addition to this, I have also added the following property in the Build.scala file
sys.props += "packaging.type" -> "jar"
I see that build task tries to include the hk2-locator-2.26-b09 dependency, which doesn't exist. I am not sure what I might be doing incorrectly, and why this setup works on one system and not on the other one.
Any help is appreciated.