transitive dependency exclusion fails when classifier specified on a subproject and building the root project. --------------------------------------------------------------------------------------------------------------
Key: MNG-4939 URL: http://jira.codehaus.org/browse/MNG-4939 Project: Maven 2 & 3 Issue Type: Bug Components: Dependencies Affects Versions: 2.2.1 Environment: Window XP, Java 6 u10 Reporter: Sunil Kumar Dhage Priority: Blocker 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. -- 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