You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2020/07/17 15:28:00 UTC

[jira] [Updated] (MDEP-417) Dependency incorrectly reported as "Unused declared" when using annotations with RetentionPolicy=Runtime

     [ https://issues.apache.org/jira/browse/MDEP-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elliotte Rusty Harold updated MDEP-417:
---------------------------------------
    Labels: S2 close-pending  (was: close-pending)

> Dependency incorrectly reported as "Unused declared" when using annotations with RetentionPolicy=Runtime
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MDEP-417
>                 URL: https://issues.apache.org/jira/browse/MDEP-417
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: analyze
>    Affects Versions: 2.8
>            Reporter: Florian Brunner
>            Priority: Major
>              Labels: S2, close-pending
>
> In one project we're using only JPA annotations (e.g. javax.persistence.Table; RetentionPolicy=RUNTIME) from one dependency. 
> We're declaring the dependency as PROVIDED (but scope=COMPILE fails too):
> {code:xml}       <dependency>
>             <groupId>com.ibm.ws</groupId>
>             <artifactId>jpa-thinclient</artifactId>
>             <version>7.0.0.17.OM01</version>
>             <scope>provided</scope>
>         </dependency>{code}
> The dependency gets incorrectly reported as "Unused declared":
> {noformat}[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ my-project ---
> [WARNING] Unused declared dependencies found:
> [WARNING]    com.ibm.ws:jpa-thinclient:jar:7.0.0.17.OM01:provided{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)