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

bug with "non-test scoped test only dependencies found"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.0
    • None
    • analyze
    • None

    Description

      Starting with 3.2.0, I see this problem in one of my project modules:

      [INFO] --- maven-dependency-plugin:3.2.0:analyze-only (basepom.default) @ foundation ---
      [WARNING] Non-test scoped test only dependencies found:
      [WARNING] com.fasterxml.jackson.core:jackson-databind:jar:2.12.2:compile
      

      This is not correct:

      % cd lib/foundation
      
      % grep -r databind src/main
      
      src/main/java/dev/data/DataSet.java:import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
      src/main/java/dev/data/DataSet.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      src/main/java/dev/data/WriteableLocator.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      src/main/java/dev/data/ObjectMetadata.java:import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
      src/main/java/dev/data/ObjectMetadata.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      src/main/java/dev/data/DataDefinition.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      src/main/java/dev/data/ObjectAttribute.java:import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
      src/main/java/dev/data/ObjectAttribute.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      src/main/java/dev/data/ObjectDefinition.java:import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
      src/main/java/dev/data/ObjectDefinition.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      src/main/java/dev/data/ImmutableDataObject.java:import com.fasterxml.jackson.databind.annotation.JsonSerialize;
      

      So this dependency is used all over the place in the main sources (which is why it can not be in test scope). However, the plugin no longer (it did in 3.1.2) recognize it (all the uses are just annotations, so I guess that is the problem) and raises this error.

      Attachments

        1. MDEP-757-reproducer-2-rec.zip
          15 kB
          Richard Eckart de Castilho

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henning Henning Schmiedehausen
              Votes:
              11 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated: