I'd like to use mvn dependency:analyze
from the command line to check manually for dependencies problems. The problem is that I couldn't find a way to configure the behavior in the pom.xml
. All parameters must be supplied in the command line.
So I must always use
mvn dependency:analyze -DignoreNonCompile
What I'm missing is a way to set the ignoreNonCompile
in the pom.xml
in the plugin configuration.
Something like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>analyze</id>
<goals>
<goal>analyze</goal>
</goals>
<configuration>
<ignoreNonCompile>true</ignoreNonCompile>
</configuration>
</execution>
</executions>
</plugin>
But this don't work.
If I use
<goal>analyze-only</goal>
then the plugin is run during the build, and the configuration is used. But I don't want to have it run in the build, only manually requested. And running manually won't honor the parameter.
I could set a property in the pom.xml
named ignoreNonCompile
, but this will set this parameter in the build and running manually.
Is there a way to configure only the behavior of mvn dependency:analyze
?