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

Hamcrest used and unused

    XMLWordPrintableJSON

Details

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

    Description

      This is something I've seen when analyzing several Maven plugins. For example, maven-shared-utils circa July 20, 2020:

       

      [WARNING] Used undeclared dependencies found:
      [WARNING] org.hamcrest:hamcrest:jar:2.2:test
      [WARNING] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a:test
      [WARNING] Unused declared dependencies found:
      [WARNING] org.hamcrest:hamcrest-core:jar:2.2:test
      [WARNING] org.apache.maven:maven-core:jar:3.1.0:test
      [WARNING] org.codehaus.plexus:plexus-container-default:jar:2.1.0:provided

       

      Easy fix, right? don't declare org.hamcrest:hamcrest-core:jar:2.2:test and instead declare org.hamcrest:hamcrest:jar:2.2:test

       

      But when I do that:

       

      [WARNING] Used undeclared dependencies found:
      [WARNING] org.hamcrest:hamcrest-core:jar:1.3:test
      [WARNING] org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a:test
      [WARNING] Unused declared dependencies found:
      [WARNING] org.hamcrest:hamcrest:jar:2.2:test
      [WARNING] org.apache.maven:maven-core:jar:3.1.0:test
      [WARNING] org.codehaus.plexus:plexus-container-default:jar:2.1.0:provided

       

      Figure out what's going on here and fix it. Is hamcrest-core needed and used or not? is hamcrest needed and used or not? Be consistent.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            elharo Elliotte Rusty Harold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: