3
我刚刚阅读了Guava,并查看了它的源代码,但不知道如何构建它以便使用。我使用“mvn package”构建了jar文件,但它产生了Guava GWT的错误。使用Maven“mvn package”无法构建番石榴
[ERROR] Failed to execute goal on project guava-gwt: Could not resolve dependenc
ies for project com.google.guava:guava-gwt:jar:latest: Failure to find com.googl
e.guava:guava:jar:sources:latest in http://repo1.maven.org/maven2 was cached in
the local repository, resolution will not be reattempted until the update interv
al of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
现在我得到这个错误: [错误]未能执行目标org.apache.maven.plugins:Maven的万无一失-插件:2。 7.2:项目guava-test上的测试(默认测试):测试失败。 [错误] [错误]请参考D:\ Guava \ guava-tests \ target \ surefire-reports了解个别测试结果。 – Emerald214
target/surefire-reports的内容是什么?这可能会给我们提供有关问题的线索。 Guava测试套件最近开放源代码,从TRUNK构建测试有时会失败(在这种情况下,我们将在Guava跟踪器上打开一个问题)。您可以执行“mvn clean install -Dmaven.test.skip”以忽略现在的测试。也就是说,你确定你想依赖TRUNK而不是最新版本的jar吗? –
好吧,我会下载并使用释放jar而不是使用trunk。 Guava-r09已弃用,但我认为可以使用。 – Emerald214