versions icon indicating copy to clipboard operation
versions copied to clipboard

display-dependency-updates doesn't manage transitive dependencies

Open ghusta opened this issue 6 years ago • 3 comments

Only the direct dependencies are managed in this goal. The transitive ones are not.

For example :

When running mvn versions:display-dependency-updates on a project with the direct dependency org.apache.struts:struts-core:1.3.10, commons-beanutils:commons-beanutils (transitive) is not reported whereas there is a newer version than 1.8.0 (latest is 1.9.3).

Enhancement :

Maybe a parameter like processTransitiveDependencies could be useful (default false for backward compatibility).

ghusta avatar Apr 06 '18 19:04 ghusta

A good starting point could be to use org.apache.maven.shared.artifact.filter.collection.ProjectTransitivityFilter in org.apache.maven.shared:maven-common-artifact-filters:3.0.1.

Like in : https://github.com/apache/maven-dependency-plugin/blob/maven-dependency-plugin-3.1.0/src/main/java/org/apache/maven/plugins/dependency/fromDependencies/AbstractDependencyFilterMojo.java#L285

ghusta avatar Apr 06 '18 22:04 ghusta

Yes, this would very useful.

hemanthacharya avatar Sep 07 '18 07:09 hemanthacharya

The parameter processDependencyManagementTransitive belongs to the goal dependency-updates-report. It's not present in display-dependency-updates.

There's also a mention of this parameter here : #291, still unresolved

ghusta avatar Jun 28 '19 08:06 ghusta

This issue should be closed since transitive dependencies are being reported now, and parameter processDependencyManagementTransitive has been added since 2.11 and #588.

apoorva-sriv avatar Aug 30 '22 16:08 apoorva-sriv