[ 
http://jira.codehaus.org/browse/MEAR-59?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephane Nicoll updated MEAR-59:
--------------------------------

    Fix Version/s: 2.3.1

OK. I have reproduced the issue.

> Ear plugin fails to resolve artifact with null classifier when equivalent, 
> classified artifact exists
> -----------------------------------------------------------------------------------------------------
>
>                 Key: MEAR-59
>                 URL: http://jira.codehaus.org/browse/MEAR-59
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>            Reporter: Chris Tucker
>         Assigned To: Stephane Nicoll
>             Fix For: 2.3.1
>
>         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

        

Reply via email to