无法使用Maven"mvn package"构建Guava

eme*_*ieu 3 maven-3 guava

我刚刚阅读了Guava并查看了它的源代码,但不知道如何构建它来使用它.我使用"mvn package"构建了jar文件,但它产生了Guava GWT的错误.

[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
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

Eti*_*veu 5

您可能需要首先运行"mvn install",正如Charles Fry在此解释的那样:

http://groups.google.com/group/guava-discuss/browse_thread/thread/aac1ec01dc09f363

我们有一个有趣的设置,你需要在其他显而易见的东西工作之前使用'mvn install'构建东西.


如果您不关心TRUNK,您还可以依赖于使用Maven依赖项的最新版本:

maven repo中有guava-libraries吗?