Forums : CoPilot

Dear Open Hub Users,

We’re excited to announce that we will be moving the Open Hub Forum to https://community.synopsys.com/s/black-duck-open-hub. Beginning immediately, users can head over, register, get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.


On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at info@openhub.net

[FAQ] How do I determine which component is bringing in a transitive dependency?

Gradle

Use the DependencyInsightReportTask - add a task to your top-level Gradle file:

task dependencyInsightReport(type: DependencyInsightReportTask) << {}

And then find the occurance of the dependency (replace ${groupId:artifactId:version} with the external ID of the transitive dependency in question):

./gradlew dependencyInsightReport --configuration testRuntime --dependency (${groupId:artifactId:version})

This will output a tree showing the path from the target dependency to your project. The "configuration" argument determines what configuration is searched - testRuntime is used here, as this encompasses the standard compile, runtime, testCompile, and testRuntime configurations.

Maven

Use the tree command of the Maven Dependency plugin (replace ${groupId:artifactId} with the group and artifact IDs of the transitive dependency in question):

mvn dependency:tree -Dincludes=${groupId:artifactId}

This will output a tree showing the path from the target dependency to your project.

7c7cbcfd692bfcc2e16df5379ecdafd3?&s=42&rating=pg&d=https%3a%2f%2fopenhub.net%2fanon80
Nick Ver Voort about 3 years ago