IllegalStateException:尚未为Guava 12.0加载数据时无法获取工件吗? [英] IllegalStateException: impossible to get artifacts when data has not been loaded for Guava 12.0?
问题描述
在Java Play 2.1.1应用中,出现以下错误:
In a Java Play 2.1.1 app I get the following error:
[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"),
导致此错误的原因(之前一切正常)是mydependency中的依赖项更改:
The thing that causes this error (it all worked fine before) is a dependency change within mydependency:
旧:
<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,所以它已经被排除在外了.
I don't want guava 12.0 anyway and it is and was excluded.
我可以告诉Play 2.1.1使用更新的Ivy吗?
Can I tell Play 2.1.1 to use a newer Ivy?
在 plugins.sbt 中,我有:
addSbtPlugin("play" % "sbt-plugin" % "2.1.1")
临时修订 正如此处提到的那样 Apache IVY错误消息? :在未加载数据时无法获取工件手动添加依赖项可以解决该问题:我已经添加了
Temporary fix As someone mentioned here Apache IVY error message? : impossible to get artifacts when data has not been loaded manually adding the dependency solves it: I've added
"com.google.guava" % "guava" % "12.0"
问题消失了.
推荐答案
显然,越来越多的人遇到了这个问题,因此,我将我的解决方案作为答案:
Apparently more people had and have this issue, so I'm putting my solution as an answer:
临时修订 正如此处提到的那样 Apache IVY错误消息? :在未加载数据时无法获取工件手动添加依赖项可以解决该问题:我已经添加了
Temporary fix As someone mentioned here Apache IVY error message? : impossible to get artifacts when data has not been loaded manually adding the dependency solves it: I've added
"com.google.guava" % "guava" % "12.0"
问题消失了.
这篇关于IllegalStateException:尚未为Guava 12.0加载数据时无法获取工件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!