Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.1
-
Component/s: None
-
Labels:None
-
Environment:Linux
-
Number of attachments :
Description
Legacy Artifact Path Resolution returns error message when configuring a Maven plugin in a Maven 1 repo if direcotry is not under "plugins."
Example:
Artifact location: http://download.java.net/maven/1/com.sun.tools.xjc.maven2/maven-plugins/maven-jaxb-plugin-1.1.jar
Configuration:
Path: com.sun.tools.xjc.maven2/maven-plugins/maven-jaxb-plugin-1.1.jar
GroupId: com.sun.tools.xjc.maven2
ArtifactId: maven-jaxb-plugin
Version: 1.1
Classifier:
Type: maven-plugin
Error message:
artifact reference does not match the initial path : com.sun.tools.xjc.maven2/plugins/maven-jaxb-plugin-1.1.jar
Also, the auto complete feature does not correctly slice the input initially:
ArtifactId: maven
Version: jaxb-plugin-1.1
The issue is not about legacy artifact path support but about legacy-layout support from proxyConnectors.
The requested ArtifactReference is of type "maven-plugin" as we could expect for a m2 plugin request. This is converted in M1 layout to "/plugins/" according to AbstractLegacyRepositoryContent.typeToDirectoryMap
But a m2 maven-plugin project deployed on a legacy-layout repository will use "/maven-plugins/" as configured by maven ArtifactHandler (maven-artifact).
I think we must split the "plugin" type into maven-plugin for M2 plugins and "maven-one-plugin" for M1 plugins (as specified by ArtifactHandler in maven-one-plugin) to avoid such conflicts.