maven-3之无法使用 Maven "mvn package"构建 Guava

JustinYoung 阅读:24 2024-11-24 20:56:43 评论:0

我刚刚阅读了 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 

请您参考如下方法:

您可能需要先运行“mvn install”,正如 Charles Fry 在这里解释的那样:

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

We have a funny setup where you have to build stuff using 'mvn install' before the other obvious stuff works.


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

is guava-libraries available in maven repo?


标签:Maven
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

关注我们

一个IT知识分享的公众号