-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
None
-
None
-
Severity 3 - Minor
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:
- https://answers.atlassian.com/questions/39984820
- CLV-6357 ticket
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
[CLOV-1966] Clover Maven Plugin adds "clover" classifier for directory-based artifacts
Resolution | New: Won't Fix [ 2 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
Fix Version/s | New: open-source [ 56395 ] |
Comment | [ A comment with security level 'jira-users' was removed. ] |
Comment | [ A comment with security level 'jira-users' was removed. ] |
Symptom Severity | New: Minor [ 14432 ] |
Workflow | Original: New Clover Workflow [ 1589825 ] | New: New Clover Workflow - Restricted [ 1589826 ] |
Issue Type | Original: Improvement [ 4 ] | New: Bug [ 1 ] |
Description |
New:
*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: !aspectproject-normal-jar.png|thumbnail! !aspectproject-clover-jar.png|thumbnail! 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: * https://answers.atlassian.com/questions/39984820 * CLV-6357 ticket *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: {quote} [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. {quote} * 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 |
Attachment | New: aspectproject-clover-jar.png [ 209866 ] | |
Attachment | New: aspectproject-normal-jar.png [ 209867 ] |