Question

I have following problem:

I have 6-7 and more paths where from my jar is passing to classpath, and I need to get all nasted jars in my pom, and set exclusions. For now I use my Intellij Idea to build dependency tree, then use search and find all jars, and proceed exclusion one by one. Its very slow process, because Intellij works VERY slow with dependency tree. Can you suggest me some better way to do all exclusions?

Thanks

Was it helpful?

Solution

Still a manual step, but it gets round the problem of a slow IDE.

On the command line, run

mvn dependency:tree

This will print out the nested jars. I would then exclude them manually in the pom.

OTHER TIPS

You can ask IntelliJ to generate you maven dependency diagram (ctrl + alt + shift + U).

From that diagram you can right-click any dependency and exclude it. Relevant section in pom.xml will be automatically updated (<exclusion> elements added).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top