apache / apache/maven

[MNG-7826] Maven Plugin Validation: Jacoco plugin is not reported as problem

Open
#9,094 5 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Tamas Cservenak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=cstamas)** opened **[MNG-7826](https://issues.apache.org/jira/browse/MNG-7826?redirect=false)** and commented

Maven 3.9.2 regarding jacoco maven plugin 0.8.10 reports this:

```
[WARNING] * org.jacoco:jacoco-maven-plugin:0.8.10
[WARNING] Declared at location(s):
[WARNING] * com.soebes.smpp:smpp:6.0.4-SNAPSHOT (pom.xml) @ line 484
[WARNING] Used in module(s):
[WARNING] * com.soebes.smpp:smpp:6.0.4-SNAPSHOT (pom.xml)
[WARNING] * com.soebes.smpp:smpp-plugins:6.0.4-SNAPSHOT (smpp-plugins/pom.xml)
[WARNING] Plugin issue(s):
[WARNING] * Plugin is a Maven 2.x plugin, which will be not supported in Maven 4.x
[WARNING] * Plugin mixes multiple Maven versions: [3.0, 2.0.2]
[WARNING] * Plugin should declare these Maven artifacts in `provided` scope: [org.apache.maven:maven-repository-metadata:3.0, org.apache.maven:maven-artifact:3.0]
[WARNING] * Plugin depends on plexus-container-default, which is EOL
```

and all these are true: culprit is ancient shared file-management, that the plugin depends in compile scope, while it brings in
* p-c-d
* maven-plugin-api, maven-artifact-manager etc from mvn 2.0.2
* etc

Maven 3.9.3 does not report anything related to this plugin, while if 3.9.3 runs a build using it, it clearly shows this in debug (presence of Maven 2 artifacts and p-c-d):

```
[INFO] --- jacoco:0.8.10:prepare-agent (default) @ smpp ---
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository).
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for snapshots (http://snapshots.maven.codehaus.org/maven2).
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for apache.snapshots (http://cvs.apache.org/maven-snapshot-repository).
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for central (http://repo1.maven.org/maven2).
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for codehaus.snapshots (http://snapshots.repository.codehaus.org).
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for apache.snapshots (http://people.apache.org/maven-snapshot-repository).
[DEBUG] Using mirror px-oss (http://urnebes.local:8881/content/groups/oss/) for apache.snapshots (http://repository.apache.org/snapshots).
[DEBUG] Dependency collection stats {ConflictMarker.analyzeTime=88693, ConflictMarker.markTime=60265, ConflictMarker.nodeCount=38, ConflictIdSorter.graphTime=53367, ConflictIdSorter.topsortTime=15824, ConflictIdSorter.conflictIdCount=21, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=753636, ConflictResolver.conflictItemCount=34, DfDependencyCollector.collectTime=66088125, DfDependencyCollector.transformTime=990804}
[DEBUG] org.jacoco:jacoco-maven-plugin:jar:0.8.10
[DEBUG] org.codehaus.plexus:plexus-utils:jar:3.0.24:compile
[DEBUG] org.apache.maven.shared:file-management:jar:1.2.1:compile
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0.6:compile
[DEBUG] org.apache.maven.shared:maven-shared-io:jar:1.1:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0.2:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0.2:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0.2:compile
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile
[DEBUG] junit:junit:jar:4.13.1:compile (version managed from default)
[DEBUG] org.hamcrest:hamcrest-core:jar:1.3:compile
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] org.apache.maven.reporting:maven-reporting-api:jar:3.0:compile
[DEBUG] org.apache.maven.doxia:doxia-sink-api:jar:1.0:compile
[DEBUG] org.jacoco:org.jacoco.agent:jar:runtime:0.8.10:compile
[DEBUG] org.jacoco:org.jacoco.core:jar:0.8.10:compile
[DEBUG] org.ow2.asm:asm:jar:9.5:compile (version managed from default)
[DEBUG] org.ow2.asm:asm-commons:jar:9.5:compile (version managed from default)
[DEBUG] org.ow2.asm:asm-tree:jar:9.5:compile (version managed from default)
[DEBUG] org.jacoco:org.jacoco.report:jar:0.8.10:compile
[DEBUG] Created new class realm plugin>org.jacoco:jacoco-maven-plugin:0.8.10
```

---

**Affects:** 3.9.3

**Issue Links:**
- [MNG-7789](https://issues.apache.org/jira/browse/MNG-7789) Plugin Dependency Validations use wrong data set
(_**"is caused by"**_)

**Remote Links:**
- [GitHub Pull Request #1186
](https://github.com/apache/maven/pull/1186)

Contributor guide

Open the contributing guide

Research direction

Start with Maven 3.9.3's plugin dependency validation and the related MNG-7789 issue, using the reported pom.xml dependency tree as the reproduction context. Compare the behavior with remote pull request #1186; done means Jacoco's Maven 2 and legacy dependency problems are reported consistently when they are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.