$ mvn dependency:analyze
$ mvn dependency:resolve
$ mvn dependency:tree
$ mvn dependency:purge-local-repository
# Display basic plugin information $ mvn dependency:help # Display detailed information about all goals and parameters $ mvn dependency:help -Ddetail=trueIf you need to use the plugin's full coordinates instead of its prefix, you can do that as follows:
# Display basic plugin information $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.8.1:help # Display detailed information about all goals and parameters $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.8.1:help -Ddetail=trueYou can also use the Maven help plugin to describe the dependency plugin:
# Basic plugin description using help plugin $ mvn help:describe -Dplugin="org.apache.maven.plugins:maven-dependency-plugin:3.8.1" # Detailed plugin description with all parameters $ mvn help:describe -Dplugin="org.apache.maven.plugins:maven-dependency-plugin:3.8.1" -Ddetail=trueTo get specific information about a goal, use the goal parameter:
# Help for the 'analyze' goal $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.8.1:help -Dgoal=analyze -Ddetail=true # Help for the 'analyze' goal using the help plugin $ mvn help:describe -Dplugin="org.apache.maven.plugins:maven-dependency-plugin:3.8.1" -Dgoal=analyze -Ddetail=trueNote: When using the plugin's help goal directly, you don't need to specify the version if the plugin is already configured in your POM or if you want to use the latest version.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>dependency-analyze</id>
<phase>package</phase>
<goals>
<goal>analyze</goal>
</goals>
<configuration>
<failOnWarning>true</failOnWarning>
<ignoreNonCompile>true</ignoreNonCompile>
<ignoredDependencies>true</ignoredDependencies>
<outputXML>true</outputXML>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>commons-io:commons-io:jar:*</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
<ignoredUsedUndeclaredDependencies>
<ignoredUsedUndeclaredDependency>org.apache.httpcomponents:httpcore:jar:*</ignoredUsedUndeclaredDependency>
</ignoredUsedUndeclaredDependencies>
</configuration>
</execution>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/endorsed</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>