Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.2.1
-
Fix Version/s: None
-
Component/s: Plugins and Lifecycle
-
Labels:None
-
Environment:JDK 1.6.0_23 (64 bit) , Nexus 1.8 for repository, Windows 7 64 bit
-
Complexity:Intermediate
-
Number of attachments :
Description
In our company repository (using Nexus), it provide several repository groups. PUBLIC is proxy to public repository. EXT contains 3rd party artifacts that is not available on public repo.
My settings.xml contains NO mirrors declaration, and in which defined a activeProfile that contains several repositories and plugin repositories, which put EXT and PUBLIC (EXT comes before PUBLIC).
I have did a minor change in a 3rd party plugin, org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1, and I put the modified version in EXT repo, with version changed to 1.0-alpha-1.1
A project is declared to use the plugin org.codehaus.mojo:native2ascii-maven-plugin, with no version provided.
Local repository should be purged before building the project.
By building the project, and inspects the local repository, it can be found that only JAR of the plugin is downloaded, but not the POM. By adding -X option when building with Maven, it can be found that Maven is downloading JAR of org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1.1 from EXT, but then trying to get the POM from central. As there is no such artifact in central repository, Maven treated that as no POM available.
However, if plugin version is added in the project POM, everything will be fine. Plugin POM is correctly downloaded.
Although it is my fault that plugin version is missed in the project, it does not seems that reasonable for the behavior for Maven: It downloaded the plugin JAR from the first plugin repository (I bet it simply get the latest version), and then trying to get the plugin POM from a totally unrelated location (central repo in such case).
Attached please find the testing project as part of the test case. However, as the test needs quite a lot of setup in the environment, I cannot provide the full test case.