Maven无法下载其插件(如同干净),这种情况可能取决于代理配置问题吗?

时间:2015-08-19 10:43:50

标签: java eclipse maven ide maven-plugin

我不是很喜欢Maven,我有以下问题:

我从我公司的SVN存储库下载了一个项目(使用 Spring ),并且有一些构建错误似乎取决于某些依赖项缺失的事实(例如所有Spring依赖关系)。

所以我尝试选择项目并执行运行为---> Maven Clean 作为构建项目之前的第一步(如果我在构建之前执行清理,如果我执行 Maven构建,但这在此阶段并不重要),我会收到此错误消息:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GestioneUtenzeCloud 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://srvabc02.soft.it:8888/artifactory/plugins-release/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] Downloading: http://srvabc02.soft.it:8888/artifactory/plugins-snapshot/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.561 s
[INFO] Finished at: 2015-08-19T12:35:43+02:00
[INFO] Final Memory: 7M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (http://srvabc02.soft.it:8888/artifactory/plugins-release): srvabc02.soft.it: Unknown host srvabc02.soft.it -> [Help 1]
[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/PluginResolutionException

所以它似乎无法下载Maven插件(在这种情况下是干净的插件)。

我的计算机通过公司代理连接到Internet,所以我认为无法下载Maven插件,因为我的Eclipse上没有配置代理......是否可能?我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:0)

由我自己解决。我已将Maven代理设置添加到 .m2 目录中的 settings.xml 文件中。

正如官方文档中所述:https://maven.apache.org/guides/mini/guide-proxies.html