maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephane Nicoll (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MEAR-59) Ear plugin fails to resolve artifact with null classifier when equivalent, classified artifact exists
Date Sat, 17 Mar 2007 14:41:41 GMT

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

Stephane Nicoll commented on MEAR-59:
-------------------------------------

I don't follow. Could you please add a sample project that at least shows the dependencies
and your configuration. If there is more than one artifact with the same groupId/artifactId/type,
you *must* specify a classifier.

> 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
>         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

        

Mime
View raw message