maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Hablützel (JIRA) <>
Subject [jira] (MEAR-180) Artifacts with same ID are ignored in packaging
Date Mon, 16 Jun 2014 05:15:10 GMT


Reto Hablützel reopened MEAR-180:

Hi, the basic problem is that the maven ear plugin sees certain artifacts as the same and
thus does not include them in the ear although they are in fact not the same. This happens
because it identifies them only by their artifactId and version, which is not enough to identify
a maven artifact - the groupId should be considered as well.

There are surely ways to work around this, such as the one pointed out by you, but the general
problem remains the same.

Please note that this issue has been discussed on the mailing list and has been described
as a flaw by other users as well.

> Artifacts with same ID are ignored in packaging
> -----------------------------------------------
>                 Key: MEAR-180
>                 URL:
>             Project: Maven Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 2.9
>            Reporter: Reto Hablützel
>            Assignee: Karl-Heinz Marbaise
>         Attachments:
> The attached sample consists of an ear that references two other projects, both of which
have the *same artifactId and the same versionId*, but *not the same groupId*.
> Both are to be packaged in the lib folder, but only the first will make it in, because
the maven ear plugin identifies them only by their artifactId and version. This means that
when it sees the second dependency, it thinks it was already in there.
> Note that I already brought this up on the mailing list:
> Follow these steps to recreate the issue based on the attached sample:
> {quote}
> Install 'utilities' project in 'collections':
> collections/utilities> mvn install
> Install 'utilities' project in 'email':
> email/utilities> mvn install
> Package 'ear' project:
> ear> mvn package
> Look at contents of ear and notice how only one jar is included:
> ear> unzip -v target/ear-1.0.0.ear
> Now use the debug flag to see why only one gets included:
> ear> mvn --debug clean package
> Partial output:
>   \[INFO\] Copying artifact \[\] to \[utilities-1.0.0.jar\]
>   \[DEBUG\] Skipping artifact \[jar:ch.rethab.collections:utilities:1.0.0\], as it is
already up to date at \[utilities-1.0.0.jar\]
> {quote}
> Note that this sample shows how dependent libraries are ignored, but I think it is also
an issue if you have two ejbs with the same name and version - though that is probably far
less likely.

This message was sent by Atlassian JIRA

View raw message