Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Duplicate
-
2.2.1
-
None
-
None
-
Window XP, Java 6 u10
Description
My issue is related to MNG-3555.
I have a root pom which has multiple child projects and poms.
For simplicity let us consider project Subproject1,Subproject2.
Subproject1 has a distribution.xml which will install a classifier based jar (Subproject1-1.0-distribution.jar)along with the actual Subproject1-1.0.jar
The Subproject1-1.0-distribution.jar contains only those classes which are used in Subproject2. And its size is something around 10KB and
the Subproject1-1.0.jar contains all the transitive dependencies and the complete functionality and the size is few MB.
Now I want to have the Subproject1-1.0-distribution.jar as a dependency in Subproject2 and I am excluding all the third party jars.
After going through closing comments of MNG-3555, I could understand that
I should exclude for the main dependency as well.
1.How can we mention that particular exclusion is for main dependency and particular exclusion is for classifier based dependency?
2. Do I need to create two dependencies one for Subproject1 and other with classifier?
Here my Subproject2 is in need of only Subproject1-1.0-distribution.jar only. Why should I create one more dependency and exclude the jars.
PS: 1. Interesting point is if I am building Subproject2 alone then the excluded jars are getting excluded
But when I build the root, then my Subproject2 will not be able to exclude the excluded jars.
2. If my Subproject2 has a similar dependency on SomeOther-1.0-distribution.jar, which is not a sibling, then either I build Subproject or I build root, all the excluded jars are getting excluded.
Attachments
Issue Links
- duplicates
-
MNG-4872 Dependency exclusions not always honored for dependencies with classifier
- Closed