How can I determine if a Maven dependency is never used in a project?
What I want is to view some plot with relations between Maven dependencies and classes in my project. Thus I want to find out which dependenies are used and how, and which are not.
Is there a way to do it in Idea?
I run simple mvn dependency:analyze, and it show mea number of unused and used dependenies. May be, Idea can do it in a more convinient manner?
I am using Idea 13 Ultimate.
请先登录再写评论。
You can also try this plug-in: https://plugins.jetbrains.com/plugin?pr=&pluginId=7222 .
use the Maven dependency plugin, specifically the Dependency:Analyze goal.
How should the
be added to the maven pom.xml file? Which section should it go to? The xml code above is different from the code found in https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin/2.8 and it seems they fit in different sections of the pom file.
Please see https://maven.apache.org/plugins/maven-dependency-plugin/usage.html.