You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Schildbach (JIRA)" <ji...@codehaus.org> on 2006/05/29 16:48:43 UTC
[jira] Created: (MNG-2326) exclusion of transitive dependency is
too dominant
exclusion of transitive dependency is too dominant
--------------------------------------------------
Key: MNG-2326
URL: http://jira.codehaus.org/browse/MNG-2326
Project: Maven 2
Type: Bug
Components: Dependencies
Versions: 2.0.4
Reporter: Andreas Schildbach
Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Commented: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Andreas Schildbach (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=comments#action_66449 ]
Andreas Schildbach commented on MNG-2326:
-----------------------------------------
Because I don't need T in M. However, I can never be sure that D2 (or D3, ...) needs it. It's the concept of responsibility that I don't need to know about the transitive dependencies of my dependencies. Also, it could be the case that a dependency gets a new version, which now depends on T, but I never learn about it because it is excluded.
In any case, the current (expected?) behaviour is not enough documented. Thus, I am re-opening this issue. You can count it as a documentation bug or a wishlist item.
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Reopened: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Andreas Schildbach (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=all ]
Andreas Schildbach reopened MNG-2326:
-------------------------------------
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Closed: (MNG-2326) exclusion of transitive dependency is too
dominant
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=all ]
Carlos Sanchez closed MNG-2326:
-------------------------------
Resolution: Duplicate
This is a duplicate, the exclusions affect all dependencies.
Still you should NOT exclude a dependency if you need it in any version. You have to add it to your pom and that dependency will always win the transitive ones.
From: http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Dependency mediation - this determines what version of a dependency will be used when multiple versions of an artifact are encountered. Currently, Maven 2.0 only supports using the "nearest definition" - so you can always guarantee a version by declaring it explicitly in your project's POM.
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Commented: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=comments#action_66443 ]
Carlos Sanchez commented on MNG-2326:
-------------------------------------
Why are you excluding T in M if you need it? it doesn't work like that
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Commented: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=comments#action_66468 ]
Joerg Schaible commented on MNG-2326:
-------------------------------------
1. Is a standard use case if you manage your versions in a company wide super POM
2. That was clear.
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Commented: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=comments#action_66458 ]
Joerg Schaible commented on MNG-2326:
-------------------------------------
{quote}Dependency mediation - this determines what version of a dependency will be used when multiple versions of an artifact are encountered. Currently, Maven 2.0 only supports using the "nearest definition" - so you can always guarantee a version by declaring it explicitly in your project's POM. {quote}
This is exactly, what I have done in the provided example. The child explicitly delcares the dependency and it is nevertheless simply *ignored*!
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Closed: (MNG-2326) exclusion of transitive dependency is too
dominant
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=all ]
Carlos Sanchez closed MNG-2326:
-------------------------------
Assign To: Carlos Sanchez
Resolution: Duplicate
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Updated: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=all ]
Joerg Schaible updated MNG-2326:
--------------------------------
Attachment: mng2326.zip
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Commented: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Joerg Schaible (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=comments#action_66453 ]
Joerg Schaible commented on MNG-2326:
-------------------------------------
@Carlos
Because a lot of current POMs on ibiblio do not care about proper dependency management (e.g. current commons-lang reference servlet-api) or we have a different use case than the authors (e.g. commons-configuration reference commons-digester, which is only needed if you use the ConfigurationFactory - a functionality we don't use at all). The current dependency implementation implies now, that we don't use servlet-api or digester in none of our projects anymore - which is plain wrong. While you can fix POMs of case 1, you will never be able to handle case 2 since deps are related to use case.
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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
[jira] Commented: (MNG-2326) exclusion of transitive dependency is
too dominant
Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MNG-2326?page=comments#action_66460 ]
Carlos Sanchez commented on MNG-2326:
-------------------------------------
What I'm telling you are two things
1. you don't need to exclude cglib if you are including it again (see it as a workaround if you want)
2. this is exactly a duplicate of MNG-1797
> exclusion of transitive dependency is too dominant
> --------------------------------------------------
>
> Key: MNG-2326
> URL: http://jira.codehaus.org/browse/MNG-2326
> Project: Maven 2
> Type: Bug
> Components: Dependencies
> Versions: 2.0.4
> Reporter: Andreas Schildbach
> Assignee: Carlos Sanchez
> Attachments: mng2326.zip
>
>
> Please consider the following structure: I've got a module M that has got the dependencies D1 and D2. Both D1 and D2 depend on a transitive dependency T.
> I have excluded T from D1 per <exclusion> on the M POM in the dependency to D1.
> Now, one would expect that T is still pulled into M, because there is no exclusion on the D2 path. But this is not the case, "mvn site" on M is missing T (in the dependency report), and it is missing from the classpath, too. However "mvn eclipse:eclipse" on M does the job right: T is listed.
--
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