slachiewicz commented on issue #223: URL: https://github.com/apache/maven-dependency-analyzer/issues/223#issuecomment-5742849318
Not reproducible as a single-module problem. At the merge commit of apache/maven-enforcer#289 the two warnings come from two different modules: - `enforcer-rules` has no reference to any `javax.annotation` class (source or bytecode), so "unused declared" is correct. apache/maven-enforcer#899 later removed that declaration and the build is clean. - `maven-enforcer-plugin` uses `@PreDestroy` in `EnforcerRuleCache`; without the declaration there the analyzer reports "used undeclared", which is also correct. apache/maven-enforcer#288 had already declared it in that module. Verified with maven-dependency-plugin 3.6.0 (the analyzer current in 2023) and 3.8.1: `-pl enforcer-rules analyze-only` → "Unused declared" with the declaration, "No dependency problems found" without it; `-pl maven-enforcer-plugin analyze-only` with the declaration stripped → "Used undeclared javax.annotation-api". Closing; reopen with a single-module reproducer if the flip occurs within one module. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
