在jdk版本更改后,Maven没有使用settings.xml中的镜像

时间:2015-07-07 14:09:46

标签: java maven jenkins

我有一个打印Hello world的简单java应用程序。我在settings.xml中提到了一个代理服务器,Maven在运行时应该使用它(在Jenkins中正常运行)。 以前,我使用的是jdk7。现在,我将其更改为jdk1.8.0_45并再次重新启动应用程序(在Jenkins中)。现在我可以在日志中看到maven正在搜索不应该的默认存储库。

现在错误是:

[INFO] Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.093s
[INFO] Finished at: Tue Jul 07 15:56:36 CEST 2015
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http://repo.maven.apache.org/maven2): Connection to http://repo.maven.apache.org refused: Connection timed out: connect -> [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

提前致谢!

0 个答案:

没有答案