Well, for starters this plugin analyzes the binary code and not the source code. This means that reported unused declared dependencies might in fact be used when compiling the source code. Here's a few examples; * static constants - the compiler optimizes this by replacing the constant references with the actual value. Thus, analyzing the binary code there is no dependency any longer. * runtime dependencies - runtime dependencies normally don't have a direct code dependency so the plugin don't see this. The plugin should probably ignore runtime deps and I think I've seen some discussion/jira around adding this in the upcoming release, but I could be wrong. * Annotations with source retention - these annotation references are discarded by the compiler.
There a more cases I'm sure. And there could of course also be bugs...:-) I think that what the plugin reports as "used undeclared dependencies" are always correct, but "unused declared dependencies" may be wrong. /Anders On Tue, Oct 23, 2012 at 8:05 PM, Benson Margulies <bimargul...@gmail.com> wrote: > I've a situation in which 2.5.1 of m-d-p:analyze is reporting 'unused > declared dependencies' that are not unused, in fact, removing them and > running maven 3.0.4 has the immediate and dramatic effect of making > the compile fail. Is there something I don't understand here about > what those goals are trying to report? Should I try to make a test > case? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org