【问题标题】:Jenkins (hudson) plugin development meet maven-enforcer-plugin:1.1-SNAPSHOT issueJenkins (hudson) 插件开发遇到 maven-enforcer-plugin:1.1-SNAPSHOT 问题
【发布时间】:2011-02-11 09:43:17
【问题描述】:

我尝试开发一个 jenkins (a.k.a hudson) 插件,并遵循Tutorial,并在mvn -cpu hpi:create 命令之后生成源代码树。

当我执行“mvn package”时,它会报告类似的错误

[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生成的,谁能帮我解决一下?

  • (如何)我可以更改为 plugin-1.0 版本吗?
  • 我可以在 nexus 服务器中添加什么

我只是对maven有基本的了解。

【问题讨论】:

    标签: maven hudson-plugins jenkins


    【解决方案1】:

    我自己做了两件事来修复它。

    1. 除了Tutorial 中的设置之外,将here 的Apache 快照添加到我的nexus 存储库组中

    2. 看来我的本地 maven repo 也搞砸了,所以我可以清理它并从 nexus 重新加载。

    它仍然使用maven-enforcer-plugin:pom:1.1-SNAPSHOT 插件。

    希望对你也有帮助。

    【讨论】:

      猜你喜欢
      • 2021-10-23
      • 1970-01-01
      • 1970-01-01
      • 2017-05-29
      • 1970-01-01
      • 1970-01-01
      • 2012-02-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多