我尝试开发一个jenkins (a.k.aHudson)插件,并遵循教程,并在mvn -cpu hpi:create命令之后生成源代码树。
当我执行"mvn包“时,它报告的错误如下
[INFO] Building Unnamed - com.example.jenkins:redmine2:hpi:1.0-SNAPSHOT
[INFO] task-segment: [clean]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-enforcer-plugin
Reason: Error getting POM for 'org.apache.maven.plugins:maven-enforcer-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata.
org.apache.maven.plugins:maven-enforcer-plugin:pom:1.1-SNAPSHOT
from the specified remote repositories:
nexus (http://maven.nexus.local:8888/nexus/content/groups/public)
for project org.apache.maven.plugins:maven-enforcer-plugin在我的nexus服务器上,它只有maven-enforcer-plugin:1.0版本,但是这种依赖在默认情况下是从jenkins生成的,任何人都可以帮助我解决它吗?
我只是对maven有基本的知识。
发布于 2011-02-12 04:41:30
我自己做了两件事来解决这个问题。
1.将Apache快照从这里添加到了nexus组中,这是在教程中设置的
2. --我的本地maven回购似乎也搞砸了,所以我可以清理它并从附件重新加载。
而且它仍然使用maven-enforcer-plugin:pom:1.1-SNAPSHOT插件。
希望它也能帮到你。
https://stackoverflow.com/questions/4967539
复制相似问题