How can I get only root module's dependencies when use -outputDirectory
See original GitHub issueI use this project https://github.com/mokarakaya/spring-boot-multi-module-maven.
If I run command
mvn com.github.ferstl:depgraph-maven-plugin:graph -DgraphFormat=text -DshowDuplicates -DshowConflicts -DshowVersions -DshowGroupIds
in path spring-boot-multi-module-maven/, I will get three target folder in spring-boot-multi-module-maven/, spring-boot-multi-module-maven/api/ and spring-boot-multi-module-maven/web/ separately. And the spring-boot-multi-module-maven/target/dependency-graph.txt shows:
webDemo:webDemo:1.0-SNAPSHOT:compile
But if I run command
mvn com.github.ferstl:depgraph-maven-plugin:graph -DgraphFormat=text -DshowDuplicates -DshowConflicts -DshowVersions -DshowGroupIds -DoutputDirectory="spring-boot-multi-module-maven/"
,
in path spring-boot-multi-module-maven/. The dependency-graph.txt shows all dependencies of modules but not webdemo only.
how can I get
webDemo:webDemo:1.0-SNAPSHOT:compile
when use -outputDirectory at the same time?
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
What happens here (when you use an absolute path) is, that each module will write its dependency graph into the same directory under the same name. So what you see is the dependency graph of the last module in the Maven reactor since the others were overwritten. To avoid that you can add
-DuseArtifactIdInFileName=true
when using absolute paths. This will produce different file names and you will see all three dependency graphs in that directory.You can try the following:
-N
(non-recursive) option. This will only build the parent module without the sub-modules.<plugin>
configuration with<inherited>false</inherited>
as described here: https://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_inherited_Tag_In_Build_Plugins