maven错误解析Jenkins中插件maven-eclipse-plugin的版本

时间:2015-12-17 11:37:25

标签: maven jenkins build maven-3 maven-plugin

当我在詹金斯建立工作时,我最近遇到了一个错误, 相同的构建在几周内成功,但昨天构建失败并出现以下错误:

[ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-  eclipse-plugin' from the repositories [local (/cip/home/jenkins-V1/.m2/repository-Project), central (http://mrm.fr.company.com/Project-virtual), snapshots (http://mrm.fr.company.com/Project-virtual)]: Plugin not found in any plugin repository -> [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.
[JENKINS] Archiving /cip/home/jenkins-V1/workspace/project/pom.xml to project.pom
[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/PluginVersionResolutionException

有关信息: 插件:maven-eclipse-plugin存在于项目的虚拟存储库中,然后我不知道为什么构建失败...,但是当构建失败时,它们会在该插件的位置生成一个文件。 m2 repository:生成的文件是:resolver-status.properties此文件包含:

#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Thu Dec 17 12:29:25 CET 2015
maven-metadata-snapshots.xml.lastUpdated=1450351765625
maven-metadata-central.xml.error=
maven-metadata-central.xml.lastUpdated=1450351765601
maven-metadata-snapshots.xml.error=

提前感谢您的帮助

1 个答案:

答案 0 :(得分:2)

我在Eclipse(而不是Jenkins)中遇到过这个问题,我通过clearing my maven cache解决了这个问题。

Nestor Urquiza可能拥有explanation:" pom.xml文件以某种方式被修改"。他提供了进一步的帮助,以便清除缓存无法正常工作。