Question

I'm using onejar to build an application that uses scala 2.9.2 and akka 2.0.4. When onejar does the build of my application it reports the following:

[WARNING]  Expected all dependencies to require Scala version: 2.9.2
[WARNING]  org.broadinstitute.workflow:PEMstr:1.0 requires scala version: 2.9.2
[WARNING]  org.broadinstitute.workflow:PEMstr:1.0 requires scala version: 2.9.2
[WARNING]  org.scala-lang:scala-compiler:2.9.2 requires scala version: 2.9.2
[WARNING]  com.typesafe.akka:akka-actor:2.0.4 requires scala version: 2.9.2
[WARNING]  com.typesafe.akka:akka-kernel:2.0.4 requires scala version: 2.9.2
[WARNING]  com.typesafe.akka:akka-remote:2.0.4 requires scala version: 2.9.2
[WARNING]  net.databinder:dispatch-json_2.9.1:0.8.5 requires scala version: 2.9.1
[WARNING] Multiple versions of scala libraries detected!

PEMstr is my application but beyond that I have only included the akka trio and the scala compiler as Maven dependencies. It appears that akka-remote is pulling in netty which is pulling in dispatch-json which is leading to the scala version differences. Can this be prevented? Here are some maven downloads reported during the build...

Downloading: http://scala-tools.org/repo-releases/com/typesafe/akka/akka-remote/2.0.4/akka-remote-2.0.4.jar
Downloading: http://scala-tools.org/repo-releases/io/netty/netty/3.5.4.Final/netty-3.5.4.Final.jar
Downloading: http://scala-tools.org/repo-releases/com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.jar
Downloading: http://scala-tools.org/repo-releases/net/debasishg/sjson_2.9.1/0.15/sjson_2.9.1-0.15.jar
Downloading: http://scala-tools.org/repo-releases/net/databinder/dispatch-json_2.9.1/0.8.5/dispatch-json_2.9.1-0.8.5.jar

Thanks.

Was it helpful?

Solution

No, netty doesn't have any dependency. akka-remote is the one having a dependency to sjson.

The only public version of sjson built against 2.9.2 is 0.18, while akka remote uses 0.15: http://search.maven.org/#artifactdetails%7Cnet.debasishg%7Csjson_2.9.2%7C0.18%7Cjar

Depending on your build system, you can force it to use 2.9.2/0.18. For maven (as you're talking about maven dependencies), you'll have to exclude net.debasishg/sjson_2.9.1 from akka-remote, and explicitly import net.debasishg/sjson_2.9.2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top