depgraph-maven-plugin icon indicating copy to clipboard operation
depgraph-maven-plugin copied to clipboard

Empty Graph because of an circular dependency?

Open Gerrri opened this issue 2 years ago • 4 comments

We found out that the dependency graph is empty (see below) in projects where an circular dependency exists. Is this an known issue or is there any workarround for that, or are we just too stupid to use the tool? 😄

[INFO] --- depgraph-maven-plugin:4.0.1:for-artifact (default-cli) @ standalone-pom ---
[INFO] Dependency graph:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

Gerrri avatar Apr 25 '22 14:04 Gerrri

Hi, Do you have an example where this problem occurs? Version 3.3.1 fixed a problem with circular dependencies. But these did only occur when the showConflicts flag was enabled.

ferstl avatar Apr 25 '22 20:04 ferstl

Hi and sorry for the limited information.

We have run this command: mvn com.github.ferstl:depgraph-maven-plugin:3.3.0:for-artifact -DgroupId=great.group.id -DartifactId=very-important-project -Dversion=1.0.0 -DgraphFormat=text -DshowGroupIds=true -DshowVersions=true

We could reproduce the Problem in a dummy-project. The empty graph appears, when the project only has one dependency in scope:test and in this dependency there is a circular dependency.

If you need further information, let me know :)

Gerrri avatar Apr 26 '22 06:04 Gerrri

We could reproduce the Problem in a dummy-project.

That would be nice for debugging. If I understand you correctly, your very-important-project looks something like this:

very-important-project
- some-dependency-in-test-scope
  - very-important-project
    -...

One other question: The very-important-project is an external artifact and you run the for-artifact goal without a maven project, correct? If you want to create graphs within a Maven project, you should use graph or the aggregate-* goals.

ferstl avatar Apr 26 '22 07:04 ferstl

Yes, its an external artifact and there is no maven project.

The Structure is:

very-important-project
- some-dependency-in-test-scope
  -  antoher-dependeny
    - some-dependency-in-test-scope

Gerrri avatar Apr 26 '22 11:04 Gerrri