[
http://jira.codehaus.org/browse/MPEAR-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Tucker updated MPEAR-48:
------------------------------
Attachment: MPEAR-48-maven-ear-plugin.patch
> Ear plugin fails to resolve artifact with null classifier when equivalent,
> classified artifact exists
> -----------------------------------------------------------------------------------------------------
>
> Key: MPEAR-48
> URL: http://jira.codehaus.org/browse/MPEAR-48
> Project: maven-ear-plugin
> Issue Type: Bug
> Reporter: Chris Tucker
> Attachments: MPEAR-48-maven-ear-plugin.patch
>
>
> When resolving ear modules the AbstractEarModule.java class requests a unique
> artifact from the artifact repository using getUniqueArtifact(groupId,
> artifactId, type, classifier). In the case where the classifier is null
> getUniqueArtifact will attempt to find an artifact without considering the
> classifier -- it will match *any* artifact with the same groupId, artifactId,
> and type, regardless of whether the classifier matches (is null). Currently
> the logic in AbstractEarModule does not handle the case where the classifier
> is null: if there is one artifact without a classifier (the one we're looking
> for) and another with a classifier (e.g. a clover jar) the ear module will
> throw an exception at line 104 stating that a classifier is required. This
> means that any build that builds, for example, an instrumented jar, will fail
> to construct an ear.
> This is fixed in the attached patch by explicitly iterating the set of
> artifacts that matches a call to getArtifacts() on the artifact repository
> with just the group, artifact, and type. Ideally this patch would instead be
> made to ArtifactRepository itself to include a search that explicitly matches
> null classifiers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira