Hi Brian,

It's controlled by a flag you can turn on and off.


Yes, it's true. I haven't pay enough attention.
cf. ignoreNonCompile :
http://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html

The reason it's off by default is because you may have something required to
> run the tests, but would show up as an unused dependency because it's not
> compiled in to the tests directly. An example could be hyper sql used to
> simulate a database. It's referenced via a jdbc connect string, but isn't
> compiled in, even in the tests.


It's a common problem with dynamic instantiation.
I understand why you skip runtime and test (test-runtime scope does not
exist) scope.
But what about the provide scope ? I think, by default, it should not be
skipped as for the compile scope.


(The unused dependencies are determined with bytecode analysis)


It would be nice if the maven-dependy-plugin:analyse could also indicate
which classes used undeclared dependencies.
For the moment, it indicates which dependencies are missing (that is nice).
But it's also interesting to know which classes used these missing
dependencies. Do you think that it's possible to add this feature easily ?

Rémy

Reply via email to