Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven 4 compatibility / Maven 3.9 warnings #1435

Closed
OrangeDog opened this issue May 11, 2023 · 7 comments · Fixed by #1468
Closed

Maven 4 compatibility / Maven 3.9 warnings #1435

OrangeDog opened this issue May 11, 2023 · 7 comments · Fixed by #1468

Comments

@OrangeDog
Copy link

Maven 3.9.2 reports the following issues:

[WARNING]  * org.jacoco:jacoco-maven-plugin:0.8.10
[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
@OrangeDog OrangeDog added the type: bug 🐛 Something isn't working label May 11, 2023
@Godin Godin added type: enhancement component: maven and removed type: bug 🐛 Something isn't working labels May 11, 2023
@Godin Godin self-assigned this May 11, 2023
@Godin Godin added this to Candidates in Current work items via automation May 11, 2023
@Godin Godin added this to the 0.8.11 milestone May 11, 2023
@ascopes
Copy link

ascopes commented May 15, 2023

Reproduce this with details by setting:

MAVEN_OPTS+=" -Dmaven.plugin.validation=verbose"

...before running Maven

@Godin
Copy link
Member

Godin commented May 15, 2023

@marchof AFAICS this is caused by transitive dependencies of org.apache.maven.shared:file-management:1.2.1, which is used by our MergeMojo

[INFO] +- org.apache.maven.shared:file-management:jar:1.2.1:compile
[INFO] |  +- org.apache.maven.shared:maven-shared-io:jar:1.1:compile
[INFO] |  |  +- org.apache.maven:maven-artifact:jar:3.0:compile
[INFO] |  |  +- org.apache.maven:maven-artifact-manager:jar:2.0.2:compile
[INFO] |  |  |  \- org.apache.maven:maven-repository-metadata:jar:3.0:compile
[INFO] |  |  \- org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-6:compile
[INFO] |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:compile
[INFO] |     +- junit:junit:jar:4.13.1:compile (version managed from 3.8.1)
[INFO] |     |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] |     \- classworlds:classworlds:jar:1.1-alpha-2:compile

however seems that these transitive dependencies are not needed - I drafted exclusions in #1438 and all tests pass.

Another option to solve this - is to update org.apache.maven.shared:file-management to version 3.1.0, but it requires Java 8, whereas jacoco-maven-plugin currently requires Java 5.

@marchof WDYT? maybe it's time to require Java 8 for the execution of jacoco-maven-plugin as like all core Maven plugins do nowadays ( see https://maven.apache.org/developers/compatibility-plan.html and https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-dist-tool/job/master/530/site/ ) ? note that users still will be able to execute tests with lower Java versions using maven-toolchains-plugin.

@OrangeDog
Copy link
Author

OrangeDog commented May 15, 2023

maybe it's time to require Java 8

I agree. A lot of stuff is already migrating to Java 11 minimum.

@hazendaz
Copy link

hazendaz commented May 22, 2023

Who is using java 5? Java 8 at very minimum should be required. Do note when updating to file-management, if you pass a logger to it from maven itself, call the constructor instead (with no logger) as it uses slf4j internally which conflicts with how maven has that obfuscated.

@joergsesterhenn
Copy link

@Godin Any idea when this will be released?

@Godin
Copy link
Member

Godin commented Jun 26, 2023

@joergsesterhenn See https://www.jacoco.org/jacoco/trunk/doc/faq.html

When will feature X be released?

JaCoCo is maintained by volunteers in their free time. Since we cannot guarantee free capacity, we do not commit to particular release dates. Typically, you can expect a couple of releases every year.

In the change log, you can see all features that have been implemented in master branch and will be available with the next release. And in the meantime you can test latest build of master branch (Maven SNAPSHOT) and provide feedback to us.

@OrangeDog
Copy link
Author

Just to confuse matters, Maven 3.9.3 has a bug that means it fails to detect issues in this plugin.
https://issues.apache.org/jira/browse/MNG-7826

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment