Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1966

Clover Maven Plugin adds "clover" classifier for directory-based artifacts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Low
    • open-source
    • None
    • None
    • None
    • Severity 3 - Minor

    Description

      Problem

      Clover Maven Plugin replaces list of artifacts and artifacts dependencies by using an artifact with the "clover" classifier if any such exists.

      This is useful for "clover:instrument" goal and multi-module Maven builds, because this way instrumented module can use instrumented dependencies (instead of normal ones).

      However, a build can have an artifact being a '/target/classes' folder (for a current module compiled). Maven's artifact resolver resolves such directory to be an artifact with a "clover" classifier too. Example:

      As Clover "sees" such artifact as resolved, it replaces it by the "clover" one, despite the fact that this is the same location.

      This is superfluous.

      In a normal build it works fine, but it fails when aspectj-maven-plugin is used together with clover-maven-plugin. See:

      Possible fixes

      • do not add "clover" classifier to artifacts in the same location
      • do not swizzle artifacts in clover:setup
      • do not swizzle artifacts if useCloverClassifier=false (extend usage of this property)

      Workaround

      Set cloveredArtifactExpiryInMillis=-1. This will trick Clover to see all 'clover' artifacts as outdated. Warning in logs is produced:

      [WARNING] Using [<artifact>], built on <date> even though a Clovered version exists but it's older (lastModified: <date> ) and could fail the build. Please consider running Clover again on that dependency's project.

      • note that setting useCloverClassifier=false does not help (this is for output artifacts, not dependencies)
      • note that changing "clover:instrument" to "clover:setup" does not help

      Attachments

        Activity

          People

            Unassigned Unassigned
            mparfianowicz Marek Parfianowicz
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: