In the attached example project, module "usage" uses annotation @Example:
which is defined in module "annotation" as:
Consequently, the pom.xml of module "usage" defines a compile-dependency to module "annotation" but the dependency:analyze-only goal incorrectly reports this as unused dependency:
This false positive is only reported if
- the annotation is meta-annotated with target TYPE_USE + TYPE_PARAMETER
- and the source.version/target.version of the compiler plugin for module "usage" is 1.8
There's no false positive if the @Target meta-annotation is removed or if compiler's source/target version is set to 1.7.