java – Maven构建失败的依赖项

前端之家收集整理的这篇文章主要介绍了java – Maven构建失败的依赖项前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个本地artefact存储库,我的maven设置指向,但由于某种原因,这似乎没有击中它,并在尝试安装时一直失败.
我可以直接在浏览器中访问该URL,也可以通过浏览器访问maven repo.
我也可以ping两个.

任何想法为什么一直失败?
下面的堆栈跟踪

干杯,

mvn clean install -DskipTests -T 8C
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-webdav/1.0-beta-2/wagon-webdav-1.0-beta-2.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project uk.co.three:Three:0.1 (/Users/***/Projects/three/Development/pom.xml) has 1 error
[ERROR]     Unresolveable build extension: Plugin org.apache.maven.wagon:wagon-webdav:1.0-beta-2 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2 (): Failed to read artifact descriptor for org.apache.maven.wagon:wagon-webdav:jar:1.0-beta-2: Could not transfer artifact org.apache.maven.wagon:wagon-webdav:pom:1.0-beta-2 from/to central (http://repo1.maven.org/maven2): Error transferring file: Connection refused -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

解决方法

我不知道您是否使用了嵌入式或外部maven安装(Window-> Preferences – > Maven – > Installations).

如果是外部的,则必须在settings.xml中声明您的公司代理(在外部安装的conf文件夹中或在本地存储库中).

如果您使用嵌入式maven也可能是这种情况.然后,您必须在“嵌入式​​安装的全局设置”中提供设置文件.

如果您正在使用外部maven安装,您还可以在eclipse之外尝试命令行.

mvn -U ...

您可以强制maven查找最新的插件版本.

原文链接:https://www.f2er.com/java/121964.html

猜你在找的Java相关文章