Larry Cai
Larry Cai

Reputation: 60143

Jenkins (hudson) plugin development meet maven-enforcer-plugin:1.1-SNAPSHOT issue

I try to develop one jenkins (a.k.a hudson) plugin, and follow the Tutorial, and generated source code tree after mvn -cpu hpi:create command.

While when I do "mvn package", it reports error like

[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

From my nexus server, it has maven-enforcer-plugin:1.0 version only, but this dependence is generated from jenkins by default, anyone can help me to solve it ?

I just have basic knowledge of maven.

Upvotes: 1

Views: 1283

Answers (1)

Larry Cai
Larry Cai

Reputation: 60143

I fixed it by myself by doing two things.

1. Added Apache snapshot from here into my nexus repo group besides those setting in Tutorial

2. It seems my local maven repo is messed up as well, so I can clean it up and reload from nexus.

And it still use maven-enforcer-plugin:pom:1.1-SNAPSHOT plugins.

Hope it helps you as well.

Upvotes: 1

Related Questions