How to generate a graph of the dependency between all modules of a Maven project?

后端 未结 8 1901
遇见更好的自我
遇见更好的自我 2020-11-28 06:53

How to generate a graph of the dependency between all modules of a Maven project (excluding third party libraries like JUnit, SLF4J, etc.)? I couldn\'t find a way to include

相关标签:
8条回答
  • 2020-11-28 07:38

    If the Dependency Graph feature of m2eclipse doesn't cover your needs, maybe have a look at the Maven Graph Plugin and in particular its graph:reactor goal.

    UPDATE: the Dependency Graph feature was removed in m2eclipse 1.0. For more info see: Maven POM-Editor: Dependency Graph missing

    0 讨论(0)
  • 2020-11-28 07:40

    Installed Maven Graph Plugin: http://mvnplugins.fusesource.org/maven/1.10/maven-graph-plugin/index.html, configured it this way to hide third party dependencies. Worked out fine.

     <profile>
      <id>graph</id>
      <pluginRepositories>
        <pluginRepository>
          <id>mvnplugins.fusesource.org</id>
          <url>http://mvnplugins.fusesource.org/repo/release</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </pluginRepository>
      </pluginRepositories>
      <build>
        <plugins>
          <plugin>
            <groupId>org.fusesource.mvnplugins</groupId>
            <artifactId>maven-graph-plugin</artifactId>
            <version>1.10</version>
    
            <configuration>
              <hideExternal>true</hideExternal>
            </configuration>
    
          </plugin>
        </plugins>
      </build>
    </profile>
    
    0 讨论(0)
提交回复
热议问题