IllegalStateException:没有为Guava 12.0加载数据时无法获取工件?

时间:2013-05-17 17:25:58

标签: sbt ivy playframework-2.1

在Java Play 2.1.1应用程序中,我收到以下错误:

[myproject] $ update
[info] Updating {file:/C:/path/myproject/}myproject...
[info] Resolving ...
[error] impossible to get artifacts when data has not been loaded. IvyNode = com.google.guava#guava;12.0
[error] (*:update) java.lang.IllegalStateException: impossible to get artifacts when data has not been loaded. IvyNode = com.google.guava#guava;12.0
[error] Total time: 230 s, completed 17.05.2013 19:16:41

Build.scala

"com.google.guava" % "guava" % "14.0.1",
"org.mydependency" % "mydependency" % "1.0-SNAPSHOT" changing() exclude("org.jboss.netty","netty") exclude("com.google.guava", "guava") exclude("log4j", "log4j"),

导致此错误的事情(之前一切正常)是我的依赖项中的依赖项更改:

旧:

<dependency>
    <groupId>com.thinkaurelius.titan</groupId>
    <artifactId>titan-berkeleyje</artifactId>
    <version>0.3.1</version>
</dependency>

新:

<dependency>
    <groupId>com.thinkaurelius.titan</groupId>
    <artifactId>titan-cassandra</artifactId>
    <version>0.3.1</version>
</dependency>

我不想要番石榴12.0而且它被排除在外。

我可以告诉Play 2.1.1使用更新的常春藤吗?

plugins.sbt 我有:

addSbtPlugin("play" % "sbt-plugin" % "2.1.1")

临时修复 正如这里提到的Apache IVY error message? : impossible to get artifacts when data has not been loaded手动添加依赖项解决了它:我添加了

"com.google.guava" % "guava" % "12.0"

问题已经消失。

3 个答案:

答案 0 :(得分:14)

显然有更多人拥有并遇到此问题,所以我将解决方案作为答案:

临时修复 正如此处提到的Apache IVY error message? : impossible to get artifacts when data has not been loaded手动添加依赖项解决了它:我已添加

"com.google.guava" % "guava" % "12.0"

问题已经消失。

答案 1 :(得分:8)

您可以尝试将此行添加到.sbt文件中,而不是使用较低版本:

dependencyOverrides += "com.google.guava" % "guava" % "14.0.1"

答案 2 :(得分:4)

播放2.1.x使用sbt 0.12,它使用Ivy 2.3.0-rc1,但看起来这仍然是一个问题。 如果您可以使用公开的库提出复制步骤,请打开Github问题,并附上此评论的链接。