Issue Details (XML | Word | Printable)

Key: MNG-2315
Type: New Feature New Feature
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Carlos Sanchez
Votes: 87
Watchers: 55
Operations

If you were logged in you would be able to see more operations.
Maven 2 & 3

Add option to exclude all transitive dependencies for a particular one

Created: 23/May/06 05:28 PM   Updated: 30/Dec/09 06:44 PM
Return to search
Component/s: Dependencies
Affects Version/s: 2.0.4
Fix Version/s: 3.1

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
Related
 

Complexity: Intermediate


 Description  « Hide

Something like

<dependency>
...
<excludeTransitive>true</excludeTransitive>
</dependency>



Saminda Wishwajith Abeyruwan added a comment - 30/Oct/07 03:22 AM

Maven2 is all about dependency management, and transient dependencies are an important part of it. Giving a switch to exclude all the transient dependencies would be an cogent thing to do.

Having been able to obtain transient dependencies is an powerful feature. With the scenarios we have encountered so far, it has been obvious that a some sort of control over transient dependency is a viable solution.

If we could restrict that, Maven2 should look for particular depth in the transient tree, rather than all the way down, it would be a much more valuable thing for the users.

Thus,

<dependency>
...
<transientDepth>1</transientDepth>

</dependency>

Thus, EII transientDepth would contain the depth that the transient resolution framework should look in the transient dependent tree. Value of 1 mean, dependencies in the next level only.

if transientDepth is 0, it is same as <excludeTransitive>true</excludeTransitive>.

We know Maven2 rocks and has addressed many of the building issues. Hope we would get a way to control the transient dependencies as well. (What about 2.0.8 )


Matthew Smith added a comment - 05/Sep/08 09:59 AM

While transitive dependencies is what maven is all about and makes it the wonderful tool it is, there are times when those dependencies need a finer grain control. Not every pom is created equal and there are time when it is a good thing to be able to exclude all the dependencies and only include the few that are really required by a specific use case.

This is of course the exception, but an exceptional tool should be able to handle the exceptional cases.


Carlos Garcia added a comment - 10/Feb/09 03:17 PM

Yep, it will be a very nice feature for some specific situations.


Mike Nereson added a comment - 19/May/09 09:30 AM

I need this. Here is my usecase. I am using an assembly to package the dependencies of my jars into the jar. My web app bootstraps the jars and extracts the dependencies from inside the jar to the web-app's WEB-INF\lib.

My web app depends on these jars and so includes all of their dependencies. So I have to manually exclude them all. And update that exclude each time any of my modules add a new dependency.


Brad Lee added a comment - 10/Dec/09 11:46 AM - edited