Can't build Guava using Maven “mvn package”

主宰稳场 提交于 2019-12-12 15:07:11

问题


I have just read about Guava and checked out its source code but don't know how to build it to use. I built jar file using "mvn package" but it generates errors of 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


回答1:


You might need to run "mvn install" first, as Charles Fry explained here:

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.


You could also depend on the most recent release using a Maven dependency, if you don't care about TRUNK:

is guava-libraries available in maven repo?



来源:https://stackoverflow.com/questions/7724722/cant-build-guava-using-maven-mvn-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!