3

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.

4

1 回答 1

1

不,netty 没有任何依赖关系。akka-remote 是依赖于 sjson 的。

针对 2.9.2 构建的 sjson 的唯一公共版本是 0.18,而 akka 远程使用 0.15:http ://search.maven.org/#artifactdetails%7Cnet.debasishg%7Csjson_2.9.2%7C0.18%7Cjar

根据您的构建系统,您可以强制它使用 2.9.2/0.18。对于 maven(当您谈论 maven 依赖项时),您必须从 akka-remote 中排除 net.debasishg/sjson_2.9.1,并显式导入 net.debasishg/sjson_2.9.2。

于 2012-12-22T08:06:33.743 回答