I am using the dependency:analyze
to detect dependency problems. But I have found a problem with the transitive dependencies because the plugin doesn't resolve this dependencies.
When I execute mvn dependency:tree, the output shows the transitive dependencies.
Dependencies
project A
dependency B
project C
dependency A
Outuput -> (project C - path)/ mvn clean install
[WARNING] Used undeclared dependencies found:
dependency B: compile
Plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>analyze</id>
<phase>verify</phase>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<failOnWarning>true</failOnWarning>
</configuration>
</execution>
</executions>
</plugin>
Why the plugin doesn't detect the transitive dependency