An explanation of your problem can be found in the official documentation:
verbose Whether to include the omitted nodes in the serialized dependency tree. Please note that this function actually uses the Maven 2 algorithm and may give incorrect results when used with Maven 3.
Look at line 245 of TreeMojo.java for version 2.10:
if ( verbose ) { // verbose mode force Maven 2 dependency tree component use if ( ! isMaven2x() ) { getLog().warn( "Using Maven 2 dependency tree to get verbose output, " + "which may be inconsistent with actual Maven 3 resolution" ); } dependencyTreeString = serializeVerboseDependencyTree( dependencyTreeBuilder.buildDependencyTree( project, localRepository, artifactFilter ) ); }
It actually prints a warning if maven 2 is not used.
Now look at line 243 of TreeMojo.java for version 2.8:
if ( verbose ) {
Warning logs do not exist there, therefore:
Was it always that Maven 2 was used for -Dverbose, but only now they added a warning?
Yes, a warning has been added since version 2.8.
Can I fix this or avoid it at all?
I do not think this does not ignore warning log messages or editing source code.
However, as you can see, the functionality of Maven 2 was already used in 2.8. I hope you get rid of it in later versions when they migrate dependency:tree -Dverbose to use maven 3 functionality.
source share