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

[MNG-7266] Remove maven-compat #1487

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Giovds
Copy link
Contributor

@Giovds Giovds commented Apr 26, 2024

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY,
    where you replace MNG-XXX and SUMMARY with the appropriate JIRA issue.
  • Also format the first line of the commit message like [MNG-XXX] SUMMARY.
    Best practice is to use the JIRA issue title in both the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@cstamas
Copy link
Member

cstamas commented Apr 26, 2024

maven-site plugin is still maven2 dependant...

@cstamas
Copy link
Member

cstamas commented Apr 26, 2024

@michael-o can we have a taste on new Ms from site suite?

@Giovds
Copy link
Contributor Author

Giovds commented Apr 26, 2024

I've noticed in the .svg that the compat module sits between core and wagon-provider-api. What is the next step for the wagon-provider-api?

Does this mean we remove the wagon-provider-api as well, or do we link core with wagon-provider-api, or is there another path we should take?

@cstamas
Copy link
Member

cstamas commented Apr 26, 2024

I think wagon-provider-api is a must as it is used in Maven3 plugins as well... so only compat is the one that is getting booted

@michael-o
Copy link
Member

@michael-o can we have a taste on new Ms from site suite?

You want to me run the entire test setup of Doxia/MSITE w/o depending on maven-compat or with with PR of Maven 4?

@cstamas
Copy link
Member

cstamas commented Apr 26, 2024

@michael-o if you look at failed CI jobs, they are due msite plugin wanting stuff that is actually removed (maven-compat). Am interested could you -- maybe even within this PR -- set up M versions that hopefully does not depends on maven-compat?

@michael-o
Copy link
Member

@michael-o if you look at failed CI jobs, they are due msite plugin wanting stuff that is actually removed (maven-compat). Am interested could you -- maybe even within this PR -- set up M versions that hopefully does not depends on maven-compat?

Ok, I see what you are after. Will look into this.

@michael-o
Copy link
Member

@cstamas I gave it a spin. A few components rely falsely on maven-compat, this can be removed, but the larger work is on doxia-sitetools which still use classes from maven-compat. I'd like to complete this release trail and then have a look with you at doxia-sitetools how to remove those classes and then the entire stack can be made free of maven-compat.

@cstamas
Copy link
Member

cstamas commented Apr 27, 2024

For start, maven-compat is really just test dep, not needed at runtime
apache/maven-doxia-sitetools#151

@michael-o
Copy link
Member

Someone needs to fix maven-plugin-plugin first:

[INFO]
[INFO] --- jar:3.3.0:jar (default-jar) @ maven-site-plugin ---
[INFO] Building jar: /var/osipovmi/Projekte/maven-site-plugin/target/maven-site-plugin-4.0.0-M14-SNAPSHOT.jar
[INFO]
[INFO] --- plugin:3.10.2:addPluginArtifactMetadata (default-addPluginArtifactMetadata) @ maven-site-plugin ---
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  02:07 min
[INFO] Finished at: 2024-04-28T12:34:23+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.10.2:addPluginArtifactMetadata (default-addPluginArtifactMetadata) on project maven-site-plugin: Execution default-addPluginArtifactMetadata of goal org.apache.maven.plugins:maven-plugin-plugin:3.10.2:addPluginArtifactMetadata failed: A required class was missing while executing org.apache.maven.plugins:maven-plugin-plugin:3.10.2:addPluginArtifactMetadata: org/apache/maven/artifact/repository/metadata/ArtifactRepositoryMetadata
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-plugin-plugin:3.10.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/net/home/osipovmi/.m2/repository/org/apache/maven/plugins/maven-plugin-plugin/3.10.2/maven-plugin-plugin-3.10.2.jar
[ERROR] urls[1] = file:/net/home/osipovmi/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.10.2/maven-plugin-tools-api-3.10.2.jar

@michael-o
Copy link
Member

As far as I can see with

commit 7c8334ac2466b05ca0cdbeb265dc4b85b0099a2a
Author: Michael Osipov <michaelo@apache.org>
Date:   2023-03-18T23:00:40+01:00

    [DOXIASITETOOLS-294] Replace legacy artifact resolution with Maven Resolver

So Doxia 2.0.0 should be fine with this, but ultimate test will be when this release train is done and I can test more.

@cstamas
Copy link
Member

cstamas commented Apr 29, 2024

Someone needs to fix maven-plugin-plugin first:

Does this still stands? Or latest one works?

@michael-o
Copy link
Member

Someone needs to fix maven-plugin-plugin first:

Does this still stands? Or latest one works?

Both are unrelated. Maven Plugin Plugin remains broken without Maven Compat.

@cstamas
Copy link
Member

cstamas commented Apr 29, 2024

Fix for m-p-p on the way apache/maven-plugin-tools#280

@gnodet
Copy link
Contributor

gnodet commented May 27, 2024

@cstamas @michael-o one blocker after upgrading to latest site is AbstractProjectInfoReport.java which uses the org.apache.maven.repository.RepositorySystem class from maven-compat. That part also uses MAT...

@michael-o
Copy link
Member

@cstamas @michael-o one blocker after upgrading to latest site is AbstractProjectInfoReport.java which uses the org.apache.maven.repository.RepositorySystem class from maven-compat. That part also uses MAT...

This is something I need to look at as a whole (reporting plugins) with @cstamas when the current Maven Reporting votes are done and Maven Site Plugin is done as well. I am currently working on lifting the reporting plugin to 3.6.3 first, whenever possible. So please bear with me.

@gnodet
Copy link
Contributor

gnodet commented May 27, 2024

@cstamas @michael-o one blocker after upgrading to latest site is AbstractProjectInfoReport.java which uses the org.apache.maven.repository.RepositorySystem class from maven-compat. That part also uses MAT...

This is something I need to look at as a whole (reporting plugins) with @cstamas when the current Maven Reporting votes are done and Maven Site Plugin is done as well. I am currently working on lifting the reporting plugin to 3.6.3 first, whenever possible. So please bear with me.

Sure, np. I just had a quick look again at this PR with the latest site plugin, so just wanted to report the outcome.

@michael-o
Copy link
Member

@cstamas @michael-o one blocker after upgrading to latest site is AbstractProjectInfoReport.java which uses the org.apache.maven.repository.RepositorySystem class from maven-compat. That part also uses MAT...

This is something I need to look at as a whole (reporting plugins) with @cstamas when the current Maven Reporting votes are done and Maven Site Plugin is done as well. I am currently working on lifting the reporting plugin to 3.6.3 first, whenever possible. So please bear with me.

Sure, np. I just had a quick look again at this PR with the latest site plugin, so just wanted to report the outcome.

Thanks, I did have this on my radar. I assumed that the cleanup in Maven Reporting Impl was enough. It obviously wasn't.

@cstamas
Copy link
Member

cstamas commented May 27, 2024

Cruft piled up in Maven should not be underestimated 😄

@Giovds Giovds force-pushed the mng-7266-remove-maven-compat branch from 1a5f665 to 2873aed Compare June 7, 2024 07:02
@michael-o
Copy link
Member

Preparing Maven 3.6.3 releases are ongoing. As soon as they are finished I will rebase my work on top of these and check all UTs and ITs.

@michael-o
Copy link
Member

@Giovds please rebase

@Giovds Giovds force-pushed the mng-7266-remove-maven-compat branch from 2873aed to fc333aa Compare June 14, 2024 13:30
Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have done some testing. There are two issues we need to work to make this happen:

  1. We need to prepare a new parent release where all plugins are updated which me and others have released in the last couple of weeks to get rid of Maven Compat (or at least bump that component everywhere):
osipovmi@deblndw011x:~/var/Projekte/maven-project-info-reports-plugin (doxia-2.0.0 *=)
$ git diff -U0
diff --git a/pom.xml b/pom.xml
index cad192d..0515509 100644
--- a/pom.xml
+++ b/pom.xml
@@ -124,0 +125 @@ under the License.
+    <version.maven-plugin-tools>3.13.1</version.maven-plugin-tools>
  1. We sill have users of Maven Compat classes:
$ for proj in maven-project-info-reports-plugin maven-plugin-tools maven-jxr maven-pmd-plugin maven-javadoc-plugin maven-checkstyle-plugin maven-surefire maven-dependency-plugin maven-invoker-plugin; do grep -r -F -f maven-compat-classes --include='*/src/main/java/**.java' $proj ; done  | grep -v org.apache.maven.reporting.MavenReportException
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java:import org.apache.maven.repository.RepositorySystem;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java:import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java:import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java:import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/PluginManagementReport.java:import org.apache.maven.repository.RepositorySystem;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/PluginsReport.java:import org.apache.maven.repository.RepositorySystem;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ProjectInfoReportUtils.java:import org.apache.maven.repository.RepositorySystem;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java:import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java:import org.apache.maven.repository.RepositorySystem;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java:import org.apache.maven.repository.RepositorySystem;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependencyManagementRenderer.java:import org.apache.maven.artifact.metadata.ArtifactMetadataRetrievalException;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependencyManagementRenderer.java:import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependencyManagementRenderer.java:import org.apache.maven.repository.RepositorySystem;
maven-plugin-tools/maven-plugin-plugin/src/it/annotation-with-inheritance-reactor/module-abstract-mojo/src/main/java/org/apache/maven/plugins/AbstractFirstMojo.java:import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
maven-plugin-tools/maven-plugin-plugin/src/it/annotation-with-inheritance/src/main/java/org/apache/maven/plugin/coreit/AbstractFirstMojo.java:import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
maven-plugin-tools/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java: * @see org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata
maven-plugin-tools/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/AddPluginArtifactMetadataMojo.java: * @see org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata
maven-plugin-tools/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/LegacySupport.java:import org.apache.maven.artifact.repository.metadata.ArtifactRepositoryMetadata;
maven-plugin-tools/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/metadata/LegacySupport.java:import org.apache.maven.artifact.repository.metadata.GroupRepositoryMetadata;
maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/GetMojo.java:import org.apache.maven.repository.RepositorySystem;

with both I need help to remove that dependency. I am willing to do the releases though for those three.

I will try -- meanwhile -- to test the other non-affected components.

Update: Just tried maven-pmd-plugin. Failed as well: Caused by: java.lang.ClassNotFoundException: org.apache.maven.artifact.resolver.ArtifactResolver likely something transitive...needs analysis.

@michael-o
Copy link
Member

Yet another finding:

$ for proj in maven-doxia* maven-reporting-* maven-site-plugin; do grep -r -F -f maven-compat-classes --include='*/src/main/java/**.java' $proj ; done  | grep -v org.apache.maven.reporting.MavenReportException
maven-site-plugin/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java:import org.apache.maven.artifact.metadata.AbstractArtifactMetadata;
maven-site-plugin/src/main/java/org/apache/maven/plugins/site/descriptor/SiteDescriptorArtifactMetadata.java:import org.apache.maven.artifact.repository.metadata.RepositoryMetadataStoreException;

@Giovds
Copy link
Contributor Author

Giovds commented Jun 28, 2024

Is there some form of documentation I can take a look at in order to help migrate the plugins that depend on compat?
Beside just removing the dependency, classes and following stacktraces I struggle to find the correct replacements of @Deprecated classes and what is expected to be used instead.

@michael-o
Copy link
Member

Is there some form of documentation I can take a look at in order to help migrate the plugins that depend on compat? Beside just removing the dependency, classes and following stacktraces I struggle to find the correct replacements of @Deprecated classes and what is expected to be used instead.

Well, that's the key. Lack of documentation. I would say that @cstamas is the expert here.

@michael-o
Copy link
Member

@cstamas Are you able to help to replace the code?

@cstamas
Copy link
Member

cstamas commented Jul 2, 2024

Sadly, it is more "case by case", can you point me at some of the plugin you want to convert?

@michael-o
Copy link
Member

Sadly, it is more "case by case", can you point me at some of the plugin you want to convert?

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

@cstamas
Copy link
Member

cstamas commented Jul 2, 2024

Rules in general:

  • nothing from maven-compat (obviously)
  • sparingly from maven-artifact (perso, I'd consider that one also deprecated). Use instead extensively this class.
  • look into some already converted plugins

In essence, whatever "alternative" solution you see, like use of compat, MAT, whatever, there IS usually equivalent functionality in either Maven APIs or Resolver APIs.

@cstamas
Copy link
Member

cstamas commented Jul 2, 2024

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.

Am looking into the other one.

EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

@gnodet
Copy link
Contributor

gnodet commented Jul 2, 2024

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.

Am looking into the other one.

EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

@michael-o
Copy link
Member

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

@gnodet
Copy link
Contributor

gnodet commented Jul 2, 2024

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

We won't be able to get rid of maven-compat in Maven 3.x branch.

@gnodet
Copy link
Contributor

gnodet commented Jul 2, 2024

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

We won't be able to get rid of maven-compat in Maven 3.x branch.

Also fwiw, m-plugin-p does not depend on maven-compat or MAT anymore (and still supports Maven 3 plugins for now).

@michael-o
Copy link
Member

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

We won't be able to get rid of maven-compat in Maven 3.x branch.

Deleting no, but we cannot also replace the code to Resolver with 3.6.3 baseline?

@michael-o
Copy link
Member

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

We won't be able to get rid of maven-compat in Maven 3.x branch.

Also fwiw, m-plugin-p does not depend on maven-compat or MAT anymore (and still supports Maven 3 plugins for now).

But that is on m-plugin-tools on master, no? The 3.x branch will remain as-is in this regard?

@gnodet
Copy link
Contributor

gnodet commented Jul 2, 2024

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

We won't be able to get rid of maven-compat in Maven 3.x branch.

Also fwiw, m-plugin-p does not depend on maven-compat or MAT anymore (and still supports Maven 3 plugins for now).

But that is on m-plugin-tools on master, no? The 3.x branch will remain as-is in this regard?

No, 3.x is free of those too afaik

[INFO] -------------------------------------< org.apache.maven.plugins:maven-plugin-plugin >-------------------------------------
[INFO] Building Maven Plugin Plugin 3.13.2-SNAPSHOT
[INFO]   from pom.xml
[INFO] -----------------------------------------------------[ maven-plugin ]-----------------------------------------------------
[INFO] 
[INFO] --- dependency:3.6.1:tree (default-cli) @ maven-plugin-plugin ---
[INFO] org.apache.maven.plugins:maven-plugin-plugin:maven-plugin:3.13.2-SNAPSHOT
[INFO] +- org.apache.maven:maven-core:jar:3.9.6:provided
[INFO] |  +- org.apache.maven:maven-settings-builder:jar:3.9.6:provided
[INFO] |  |  \- org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0:provided
[INFO] |  |     \- org.codehaus.plexus:plexus-cipher:jar:2.0:provided
[INFO] |  +- org.apache.maven:maven-builder-support:jar:3.9.6:provided
[INFO] |  +- org.apache.maven:maven-model-builder:jar:3.9.6:provided
[INFO] |  +- org.apache.maven:maven-resolver-provider:jar:3.9.6:provided
[INFO] |  +- org.apache.maven.resolver:maven-resolver-impl:jar:1.9.18:provided
[INFO] |  |  \- org.apache.maven.resolver:maven-resolver-named-locks:jar:1.9.18:provided
[INFO] |  +- org.apache.maven.resolver:maven-resolver-spi:jar:1.9.18:provided
[INFO] |  +- org.apache.maven.shared:maven-shared-utils:jar:3.3.4:provided
[INFO] |  +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.9.0.M2:provided
[INFO] |  +- com.google.inject:guice:jar:5.1.0:provided
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:provided
[INFO] |  +- com.google.guava:guava:jar:32.0.1-jre:provided
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:provided
[INFO] |  +- javax.inject:javax.inject:jar:1:runtime
[INFO] |  +- org.codehaus.plexus:plexus-classworlds:jar:2.7.0:compile
[INFO] |  +- org.codehaus.plexus:plexus-interpolation:jar:1.26:provided
[INFO] |  +- org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:provided
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.12.0:runtime
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-api:jar:3.13.2-SNAPSHOT:compile
[INFO] |  +- org.apache.maven.reporting:maven-reporting-api:jar:3.1.1:compile
[INFO] |  |  \- org.apache.maven.doxia:doxia-sink-api:jar:1.11.1:compile
[INFO] |  |     \- org.apache.maven.doxia:doxia-logging-api:jar:1.11.1:compile
[INFO] |  +- org.codehaus.plexus:plexus-xml:jar:3.0.1:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] |  +- org.apache.maven.wagon:wagon-provider-api:jar:3.5.3:compile
[INFO] |  \- org.codehaus.plexus:plexus-java:jar:1.2.0:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-generators:jar:3.13.2-SNAPSHOT:compile
[INFO] |  +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] |  |  \- commons-lang:commons-lang:jar:2.4:compile
[INFO] |  +- org.jsoup:jsoup:jar:1.17.2:compile
[INFO] |  \- net.sf.jtidy:jtidy:jar:r938:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-java:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  \- com.thoughtworks.qdox:qdox:jar:2.1.0:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-annotations:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  +- org.codehaus.plexus:plexus-archiver:jar:4.9.2:runtime
[INFO] |  |  +- org.codehaus.plexus:plexus-io:jar:3.4.2:runtime
[INFO] |  |  +- commons-io:commons-io:jar:2.15.1:runtime
[INFO] |  |  +- org.apache.commons:commons-compress:jar:1.26.1:runtime
[INFO] |  |  +- org.iq80.snappy:snappy:jar:0.4:runtime
[INFO] |  |  +- org.tukaani:xz:jar:1.9:runtime
[INFO] |  |  \- com.github.luben:zstd-jni:jar:1.5.5-11:runtime
[INFO] |  +- org.ow2.asm:asm:jar:9.7:compile
[INFO] |  \- org.ow2.asm:asm-util:jar:9.7:runtime
[INFO] |     +- org.ow2.asm:asm-tree:jar:9.7:runtime
[INFO] |     \- org.ow2.asm:asm-analysis:jar:9.7:runtime
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.13.2-SNAPSHOT:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-ant:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  \- org.apache.maven.plugin-tools:maven-plugin-tools-model:jar:3.13.2-SNAPSHOT:runtime
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-beanshell:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  \- org.apache-extras.beanshell:bsh:jar:2.0b6:runtime
[INFO] +- org.apache.maven:maven-plugin-api:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-model:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-settings:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-repository-metadata:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-artifact:jar:3.9.6:provided
[INFO] +- org.apache.maven.resolver:maven-resolver-api:jar:1.9.18:provided
[INFO] +- org.apache.maven.resolver:maven-resolver-util:jar:1.9.18:compile
[INFO] +- org.codehaus.plexus:plexus-utils:jar:4.0.1:compile
[INFO] +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:provided
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.2:provided
[INFO] |  \- javax.enterprise:cdi-api:jar:1.2:provided
[INFO] +- org.codehaus.plexus:plexus-velocity:jar:1.2:compile
[INFO] |  \- commons-collections:commons-collections:jar:3.1:compile
[INFO] +- org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.10.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
[INFO] |  |  +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] |  |  +- org.junit.platform:junit-platform-commons:jar:1.10.2:test
[INFO] |  |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-params:jar:5.10.2:test
[INFO] |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
[INFO] |     \- org.junit.platform:junit-platform-engine:jar:1.10.2:test
[INFO] +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] +- org.apache.maven.plugin-tools:maven-script-beanshell:jar:3.13.2-SNAPSHOT:test
[INFO] |  \- org.codehaus.plexus:plexus-bsh-factory:jar:1.0-alpha-7:test
[INFO] |     +- classworlds:classworlds:jar:1.1-alpha-2:test
[INFO] |     \- bsh:bsh:jar:1.3.0:test
[INFO] \- org.apache.maven.plugin-tools:maven-script-ant:jar:3.13.2-SNAPSHOT:test
[INFO]    +- org.apache.ant:ant:jar:1.10.14:test
[INFO]    +- org.apache.ant:ant-launcher:jar:1.10.14:test
[INFO]    \- org.codehaus.plexus:plexus-ant-factory:jar:1.0-alpha-2.1:test
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  0.338 s (Wall Clock)
[INFO] Finished at: 2024-07-02T16:09:44+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------

@michael-o
Copy link
Member

These two:

  • maven-plugin-tools/maven-plugin-plugin
  • maven-project-info-reports-plugin

maven-plugin-tools/maven-plugin-plugin does NOT depend on maven-compat, does it? Also, it contains traces of archaic (Maven2 times) when pom was considered "metadata" and plugin had to maintain maven-metadata.xml as well (something not needed since Resolver 1.9.x, as all data deployed generally are "artifacts", no more "metadata" to be handled by client code needed). Unsure what to be done here, maybe just bite the bullet, and raise the m-p-p prerequisite to 3.9.x (this would raise build time Maven requirement for all built plugins, but not runtime requirements) and drop all this cruft.
Am looking into the other one.
EDIT: the other one still uses MAT.... so convert it to resolver? ... and shared dep tree that is also to be dropped/deprecated. so a LOT of deprecated stuff...

We could also switch them directly to the Maven 4 API...

I'd prefer to solve this for 3.x as well to make easier for us.

We won't be able to get rid of maven-compat in Maven 3.x branch.

Also fwiw, m-plugin-p does not depend on maven-compat or MAT anymore (and still supports Maven 3 plugins for now).

But that is on m-plugin-tools on master, no? The 3.x branch will remain as-is in this regard?

No, 3.x is free of those too afaik

[INFO] -------------------------------------< org.apache.maven.plugins:maven-plugin-plugin >-------------------------------------
[INFO] Building Maven Plugin Plugin 3.13.2-SNAPSHOT
[INFO]   from pom.xml
[INFO] -----------------------------------------------------[ maven-plugin ]-----------------------------------------------------
[INFO] 
[INFO] --- dependency:3.6.1:tree (default-cli) @ maven-plugin-plugin ---
[INFO] org.apache.maven.plugins:maven-plugin-plugin:maven-plugin:3.13.2-SNAPSHOT
[INFO] +- org.apache.maven:maven-core:jar:3.9.6:provided
[INFO] |  +- org.apache.maven:maven-settings-builder:jar:3.9.6:provided
[INFO] |  |  \- org.codehaus.plexus:plexus-sec-dispatcher:jar:2.0:provided
[INFO] |  |     \- org.codehaus.plexus:plexus-cipher:jar:2.0:provided
[INFO] |  +- org.apache.maven:maven-builder-support:jar:3.9.6:provided
[INFO] |  +- org.apache.maven:maven-model-builder:jar:3.9.6:provided
[INFO] |  +- org.apache.maven:maven-resolver-provider:jar:3.9.6:provided
[INFO] |  +- org.apache.maven.resolver:maven-resolver-impl:jar:1.9.18:provided
[INFO] |  |  \- org.apache.maven.resolver:maven-resolver-named-locks:jar:1.9.18:provided
[INFO] |  +- org.apache.maven.resolver:maven-resolver-spi:jar:1.9.18:provided
[INFO] |  +- org.apache.maven.shared:maven-shared-utils:jar:3.3.4:provided
[INFO] |  +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.9.0.M2:provided
[INFO] |  +- com.google.inject:guice:jar:5.1.0:provided
[INFO] |  |  \- aopalliance:aopalliance:jar:1.0:provided
[INFO] |  +- com.google.guava:guava:jar:32.0.1-jre:provided
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:provided
[INFO] |  +- javax.inject:javax.inject:jar:1:runtime
[INFO] |  +- org.codehaus.plexus:plexus-classworlds:jar:2.7.0:compile
[INFO] |  +- org.codehaus.plexus:plexus-interpolation:jar:1.26:provided
[INFO] |  +- org.codehaus.plexus:plexus-component-annotations:jar:2.1.0:provided
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.12.0:runtime
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.36:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-api:jar:3.13.2-SNAPSHOT:compile
[INFO] |  +- org.apache.maven.reporting:maven-reporting-api:jar:3.1.1:compile
[INFO] |  |  \- org.apache.maven.doxia:doxia-sink-api:jar:1.11.1:compile
[INFO] |  |     \- org.apache.maven.doxia:doxia-logging-api:jar:1.11.1:compile
[INFO] |  +- org.codehaus.plexus:plexus-xml:jar:3.0.1:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.5.14:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.16:compile
[INFO] |  +- org.apache.maven.wagon:wagon-provider-api:jar:3.5.3:compile
[INFO] |  \- org.codehaus.plexus:plexus-java:jar:1.2.0:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-generators:jar:3.13.2-SNAPSHOT:compile
[INFO] |  +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] |  |  \- commons-lang:commons-lang:jar:2.4:compile
[INFO] |  +- org.jsoup:jsoup:jar:1.17.2:compile
[INFO] |  \- net.sf.jtidy:jtidy:jar:r938:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-java:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  \- com.thoughtworks.qdox:qdox:jar:2.1.0:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-annotations:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  +- org.codehaus.plexus:plexus-archiver:jar:4.9.2:runtime
[INFO] |  |  +- org.codehaus.plexus:plexus-io:jar:3.4.2:runtime
[INFO] |  |  +- commons-io:commons-io:jar:2.15.1:runtime
[INFO] |  |  +- org.apache.commons:commons-compress:jar:1.26.1:runtime
[INFO] |  |  +- org.iq80.snappy:snappy:jar:0.4:runtime
[INFO] |  |  +- org.tukaani:xz:jar:1.9:runtime
[INFO] |  |  \- com.github.luben:zstd-jni:jar:1.5.5-11:runtime
[INFO] |  +- org.ow2.asm:asm:jar:9.7:compile
[INFO] |  \- org.ow2.asm:asm-util:jar:9.7:runtime
[INFO] |     +- org.ow2.asm:asm-tree:jar:9.7:runtime
[INFO] |     \- org.ow2.asm:asm-analysis:jar:9.7:runtime
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.13.2-SNAPSHOT:compile
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-ant:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  \- org.apache.maven.plugin-tools:maven-plugin-tools-model:jar:3.13.2-SNAPSHOT:runtime
[INFO] +- org.apache.maven.plugin-tools:maven-plugin-tools-beanshell:jar:3.13.2-SNAPSHOT:runtime
[INFO] |  \- org.apache-extras.beanshell:bsh:jar:2.0b6:runtime
[INFO] +- org.apache.maven:maven-plugin-api:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-model:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-settings:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-repository-metadata:jar:3.9.6:provided
[INFO] +- org.apache.maven:maven-artifact:jar:3.9.6:provided
[INFO] +- org.apache.maven.resolver:maven-resolver-api:jar:1.9.18:provided
[INFO] +- org.apache.maven.resolver:maven-resolver-util:jar:1.9.18:compile
[INFO] +- org.codehaus.plexus:plexus-utils:jar:4.0.1:compile
[INFO] +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.9.0.M2:provided
[INFO] |  +- javax.annotation:javax.annotation-api:jar:1.2:provided
[INFO] |  \- javax.enterprise:cdi-api:jar:1.2:provided
[INFO] +- org.codehaus.plexus:plexus-velocity:jar:1.2:compile
[INFO] |  \- commons-collections:commons-collections:jar:3.1:compile
[INFO] +- org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
[INFO] +- org.junit.jupiter:junit-jupiter:jar:5.10.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-api:jar:5.10.2:test
[INFO] |  |  +- org.opentest4j:opentest4j:jar:1.3.0:test
[INFO] |  |  +- org.junit.platform:junit-platform-commons:jar:1.10.2:test
[INFO] |  |  \- org.apiguardian:apiguardian-api:jar:1.1.2:test
[INFO] |  +- org.junit.jupiter:junit-jupiter-params:jar:5.10.2:test
[INFO] |  \- org.junit.jupiter:junit-jupiter-engine:jar:5.10.2:test
[INFO] |     \- org.junit.platform:junit-platform-engine:jar:1.10.2:test
[INFO] +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] +- org.apache.maven.plugin-tools:maven-script-beanshell:jar:3.13.2-SNAPSHOT:test
[INFO] |  \- org.codehaus.plexus:plexus-bsh-factory:jar:1.0-alpha-7:test
[INFO] |     +- classworlds:classworlds:jar:1.1-alpha-2:test
[INFO] |     \- bsh:bsh:jar:1.3.0:test
[INFO] \- org.apache.maven.plugin-tools:maven-script-ant:jar:3.13.2-SNAPSHOT:test
[INFO]    +- org.apache.ant:ant:jar:1.10.14:test
[INFO]    +- org.apache.ant:ant-launcher:jar:1.10.14:test
[INFO]    \- org.codehaus.plexus:plexus-ant-factory:jar:1.0-alpha-2.1:test
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time:  0.338 s (Wall Clock)
[INFO] Finished at: 2024-07-02T16:09:44+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------

Thanks, let me re-evaluate my findings, they could be just false positives with proper parents.

@michael-o
Copy link
Member

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

@gnodet
Copy link
Contributor

gnodet commented Jul 2, 2024

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

@gnodet
Copy link
Contributor

gnodet commented Jul 2, 2024

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

Oh, sorry RepositorySystem. For those plugins, a dependency on maven-compat needs to be added afaik.

@michael-o
Copy link
Member

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

Oh, sorry RepositorySystem. For those plugins, a dependency on maven-compat needs to be added afaik.

This means that compat cannot be removed for those plugins? How to proceed in case?

@gnodet
Copy link
Contributor

gnodet commented Jul 3, 2024

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

Oh, sorry RepositorySystem. For those plugins, a dependency on maven-compat needs to be added afaik.

This means that compat cannot be removed for those plugins? How to proceed in case?

There are three ways:

  • add maven-compat dependency to the plugins
  • migrate the plugins to use resolver and require Maven 3.6.x
  • migrate the plugin to 4.x API and require Maven 4.x

The first one, means that we can't just delete the code now, but we can stop providing it by default in the Maven distribution.

@michael-o
Copy link
Member

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

Oh, sorry RepositorySystem. For those plugins, a dependency on maven-compat needs to be added afaik.

This means that compat cannot be removed for those plugins? How to proceed in case?

All of these plugins are one Maven 3.6.3 already. I prefer the Resolver approach. Second option.

@gnodet
Copy link
Contributor

gnodet commented Jul 3, 2024

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

Oh, sorry RepositorySystem. For those plugins, a dependency on maven-compat needs to be added afaik.

This means that compat cannot be removed for those plugins? How to proceed in case?

All of these plugins are one Maven 3.6.3 already. I prefer the Resolver approach. Second option.

Agreed, I think m-site-p is ok, it's maven-project-info-reports-plugin which depends on maven-compat and needs to be updated.

@gnodet
Copy link
Contributor

gnodet commented Jul 3, 2024

I did investigate again and now I understand what actually happens: When I run current reporting plugins wich do not depend on Maven Compat I still get CNFE, e.g., RepositorySystem or others because in 967d8fc a bunch of classes were moved to Compat and are now gone. What apparantly was fine with Maven 3.x is now not possible with Maven 4. If all changes in 967d8fc are correct then those plugins aren't compatible with 4 and need a separate branch for 4.

Do you know which class is required and not found ?

Oh, sorry RepositorySystem. For those plugins, a dependency on maven-compat needs to be added afaik.

This means that compat cannot be removed for those plugins? How to proceed in case?

All of these plugins are one Maven 3.6.3 already. I prefer the Resolver approach. Second option.

Agreed, I think m-site-p is ok, it's maven-project-info-reports-plugin which depends on maven-compat and needs to be updated.

Actually, adding maven-compat does not work, and switching to org.apache.maven.bridge.MavenRepositorySystem does not work too. The reason is the classes are present in maven-core 3.x and maven-compat 4.x. A real switch to maven-resolver api will work better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants