Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0.4
-
None
-
None
-
Linux debian 2.6.16-2-686
Description
I wanted to try the maven-eclipse-plugin, the goal make-artifacts.
mvn eclipse:make-artifacts
However, make-artifacts goal is not in eclipse plugin 2.2, only in 2.3-SNAPSHOT.
So followed guides and added pluginRepositry section into my ~/.m2/settings.xml (attached)
so that I can use an apache plugin snapshot repository.
Then I tried:
mvn org.apache.maven.plugins:maven-eclipse-plugin:2.3-SNAPSHOT:make-artifacts -P apache
But maven did not try to load the snapshot plugin:
...
[INFO] Failed to resolve artifact.
GroupId: org.apache.maven.plugins
ArtifactId: maven-eclipse-plugin
Version: 2.3-SNAPSHOT
Reason: Unable to download the artifact from any repository
org.apache.maven.plugins:eclipse:pom:2.3-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
We can see that maven did not try the pluginRep. specified in settings.xml.
The I found out that if I run the command above in the folder where pom.xml exists, it works.
(I created an initial project by archetype plugin.)
So it seems to me that this is a (maybe small) bug. Usually, people run maven in folder where pom.xml exists, most goals require it.
However, certain goals can run without pom.xml (such as eclipse:make-artifacts) and here it seems to me that maven ignored my settings (pluginRepositories).