Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.9
-
None
Description
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: https://mail-archives.apache.org/mod_mbox/maven-users/201402.mbox/browser
Follow these steps to recreate the issue based on the attached sample:
Install 'utilities' project in 'collections':
collections/utilities> mvn installInstall 'utilities' project in 'email':
email/utilities> mvn installPackage 'ear' project:
ear> mvn packageLook at contents of ear and notice how only one jar is included:
ear> unzip -v target/ear-1.0.0.earNow use the debug flag to see why only one gets included:
ear> mvn --debug clean packagePartial output:
[INFO] Copying artifact [jar:ch.rethab.email:utilities:1.0.0] 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]
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.