Maven-like dependency list for a given configuration

Although the dependcies and dependencyInsight reports are helpful, when converting from a Maven project it is difficult to compare the dependency results with those generated from Maven using these reports. A list of dependecies which provide the canonical path id and the originating configuration would allow the comparison between a Maven report generated with

mvn dependency:list -DincludeScope=test

Thanks for the idea. It’s unlikely that Gradle will ever ship with an exact replica of Maven’s dependency report. Of course this could always be provided by a third-party plugin, which we would be happy to include in the Gradle Plugin Portal.

I agree an “exact replica” would be unlikely. However, that is not what I am suggesting.

I am suggesting something that can be reasonably compared to a Maven dependency list. Comparing the dependency trees is impossible because the differences the two products have on dependency resolution.

What is output should be the component id rather than the project specific dependency id (e.g., project dependencies need to have their component id) along with the classifier if there is any (e.g., test-jar artifacts).

This would overcome some hurdles adopting Gradle for existing Maven projects.

Adding generic support for this type of report would be problematic mainly because Gradle supports many different types of dependencies. In Maven, dependencies are always Maven artifacts. Maven has no notion of “project” dependencies, which in Gradle are not required to have GAV identifiers.

I see. This makes sense, and I expect to see this at some point on our journey from a project centric to a component centric model.