You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephane Nicoll (JIRA)" <ji...@codehaus.org> on 2007/03/24 17:14:35 UTC

[jira] Closed: (MEAR-59) Unable to customize the main artifact when it is used together with an attached artifact

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

Stephane Nicoll closed MEAR-59.
-------------------------------

    Resolution: Fixed

I didn''t apply your patch, we need to have an explicit config for the main artifact.

By default <classifier>none</classifier> refers to the main artifact. This can be changed using the mainArtifactId parameter of the EAR plugin.

> Unable to customize the main artifact when it is used together with an attached artifact
> ----------------------------------------------------------------------------------------
>
>                 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