question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I get only root module's dependencies when use -outputDirectory

See original GitHub issue

I 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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ferstlcommented, Aug 9, 2021

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.

1reaction
ferstlcommented, Aug 11, 2021

Another question. What if I only want to get the dependency graph of the parent module, webdemo here, and skip the other modules api and web? That is, only one file in that directory.

You can try the following:

Read more comments on GitHub >

github_iconTop Results From Across the Web

Finding the root directory of a multi module Maven reactor ...
I want to use the maven-dependency-plugin to copy artifacts from all sub-modules of my multi-module project to a directory that is relative to...
Read more >
8.5. Controlling the Contents of an Assembly - Sonatype Help
When you use the default exclusion patterns, the Maven Assembly plugin is going to be ... When dependencies are unpacked only the outputDirectory...
Read more >
Apache Maven Assembly Plugin – Advanced Module-Set Topics
In these builds, project hierarchy is established through use of the modules section of the POM, where parent POMs specify their children in...
Read more >
Configuring Jest
This will collect coverage information for all the files inside the project's rootDir , except the ones that match **/node_modules/** or **/ ...
Read more >
GN Reference - Google Git
args: Display or configure arguments declared by the build. check: Check header dependencies. clean: Cleans the output directory. clean_stale: Cleans the stale ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found