ferstl / depgraph-maven-plugin

A Maven plugin that generates dependency graphs in various formats (DOT, GML, PlantUML, JSON and Text)
Apache License 2.0
554 stars 84 forks source link

Wrong dependency link #182

Open amanteaux opened 5 months ago

amanteaux commented 5 months ago

Hello,

I have a Github project that has a little less than 20 Maven modules: https://github.com/Coreoz/HTTP-Gateway. The depgraph-maven-plugin is very useful to verify the dependency graph of the project. I also use it to create documentation for the project.

The plugin generally works great, except now: I have added some new modules in the last few weeks, and now it shows a dependency that does not exist. I have tried many options or small changes, but the result remains the same. I have also used mvn dependency:tree to confirm that the Maven dependencies are correct.

I use the command mvn com.github.ferstl:depgraph-maven-plugin:aggregate -DcreateImage=true -DreduceEdges=false -DclasspathScope=compile "-Dincludes=com.coreoz:*" "-Dexcludes=com.coreoz:http-gateway-samples" in the root folder of the project to generate the graph.

On the tag 1.0.0-rc3, it shows an incorrect dependency link between http-gateway-openapi and http-gateway-exception: dependency-graph

The other dependencies are however correct for the modules: core, router, downstream-validation and publishers.

Is there a bug in the plugin? Or is it me who doesn't understand how the plugin works?

Thanks for your help! Aurélien

Sander-Portbase commented 3 weeks ago

I ran into a similar issue where the generated graph seemed to have a not existing edge. Using the maven dependency plugin mvn dependency:analyze revealed a used undeclared dependency.

I could not find in the documentation but I suspect this plugin uses this information and not (only) that from the declared dependency tree.