在 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
构建.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 中的依赖项更改:
老的:
<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 使用更新的 Ivy 吗?
在plugins.sbt我有:
addSbtPlugin("play" % "sbt-plugin" % "2.1.1")
临时修复 正如这里有人提到的Apache IVY 错误消息?:当尚未手动加载数据时无法获得工件添加依赖项解决了它:我添加了
"com.google.guava" % "guava" % "12.0"
问题就消失了。