Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-417

Dependency incorrectly reported as "Unused declared" when using annotations with RetentionPolicy=Runtime

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.8
    • None
    • analyze

    Description

      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):

             <dependency>
                  <groupId>com.ibm.ws</groupId>
                  <artifactId>jpa-thinclient</artifactId>
                  <version>7.0.0.17.OM01</version>
                  <scope>provided</scope>
              </dependency>

      The dependency gets incorrectly reported as "Unused declared":

      [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

      Attachments

        Activity

          People

            Unassigned Unassigned
            puce Florian Brunner
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: