You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2026/08/08 14:36:56 UTC
(maven-reporting-exec) 01/01: Remove maven-compat, which needed three things rather than one
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch drop-maven-compat
in repository https://gitbox.apache.org/repos/asf/maven-reporting-exec.git
commit 76b4562f951df209479c1ab2ff4db7e8167b3c44
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Aug 8 16:36:49 2026 +0200
Remove maven-compat, which needed three things rather than one
Nothing here imports maven-compat, but removing it took more than
deleting the line.
First, the baseline. maven-core 3.6.3 ships DefaultProjectBuildingHelper
with a field of the legacy org.apache.maven.repository.RepositorySystem,
implemented only in maven-compat, so Mojo lookups fail without it.
maven-core 3.9.12 moved that field to MavenRepositorySystem in
maven-core -- commit 3afbdb8f76, first released in 3.9.12. So
mavenVersion moves there, and resolverVersion to the 1.9.25 that ships
with it.
Second, the test built its local repository through
ArtifactRepositoryFactory, which lives only in maven-compat.
MavenRepositorySystem.createArtifactRepository is a static method with
the same five parameters, so the call is unchanged apart from the
receiver.
Third, and least obvious: the test loads maven-javadoc-plugin to
exercise the executor, and pinned 3.4.0. That version needs
RepositoryMetadataManager, whose only implementation --
DefaultRepositoryMetadataManager -- is also in maven-compat, so the
removal failed on a component this project never mentions. Current
javadoc-plugin does not use it, so the pin moves to 3.12.0.
Tests: 4, 0 failures, same as master under mvn verify.
---
pom.xml | 10 ++--------
.../maven/reporting/exec/TestDefaultMavenReportExecutor.java | 9 ++++-----
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/pom.xml b/pom.xml
index 0666a00..e71632b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,8 +57,8 @@
<properties>
<javaVersion>8</javaVersion>
- <mavenVersion>3.6.3</mavenVersion>
- <resolverVersion>1.4.1</resolverVersion>
+ <mavenVersion>3.9.12</mavenVersion>
+ <resolverVersion>1.9.25</resolverVersion>
<slf4jVersion>1.7.36</slf4jVersion>
<sitePluginVersion>${version.maven-site-plugin}</sitePluginVersion>
<projectInfoReportsPluginVersion>${version.maven-project-info-reports-plugin}</projectInfoReportsPluginVersion>
@@ -187,12 +187,6 @@
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-compat</artifactId>
- <version>${mavenVersion}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-resolver-provider</artifactId>
diff --git a/src/test/java/org/apache/maven/reporting/exec/TestDefaultMavenReportExecutor.java b/src/test/java/org/apache/maven/reporting/exec/TestDefaultMavenReportExecutor.java
index 878410f..6228798 100644
--- a/src/test/java/org/apache/maven/reporting/exec/TestDefaultMavenReportExecutor.java
+++ b/src/test/java/org/apache/maven/reporting/exec/TestDefaultMavenReportExecutor.java
@@ -30,9 +30,9 @@ import org.apache.maven.DefaultMaven;
import org.apache.maven.Maven;
import org.apache.maven.RepositoryUtils;
import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
+import org.apache.maven.bridge.MavenRepositorySystem;
import org.apache.maven.cli.MavenCli;
import org.apache.maven.cli.configuration.SettingsXmlConfigurationProcessor;
import org.apache.maven.execution.DefaultMavenExecutionRequest;
@@ -131,7 +131,7 @@ public class TestDefaultMavenReportExecutor {
Plugin plugin = new Plugin();
plugin.setGroupId("org.apache.maven.plugins");
plugin.setArtifactId("maven-javadoc-plugin");
- plugin.setVersion("3.4.0");
+ plugin.setVersion("3.12.0");
Dependency dependency = new Dependency();
dependency.setGroupId("commons-lang");
dependency.setArtifactId("commons-lang");
@@ -170,7 +170,7 @@ public class TestDefaultMavenReportExecutor {
ReportPlugin reportPlugin = new ReportPlugin();
reportPlugin.setGroupId("org.apache.maven.plugins");
reportPlugin.setArtifactId("maven-javadoc-plugin");
- reportPlugin.setVersion("3.4.0");
+ reportPlugin.setVersion("3.12.0");
for (ReportSet reportSet : javadocReportSets) {
reportPlugin.getReportSets().add(reportSet);
@@ -249,7 +249,6 @@ public class TestDefaultMavenReportExecutor {
}
private ArtifactRepository getLocalRepo() throws Exception {
- ArtifactRepositoryFactory artifactRepositoryFactory = plexusContainer.lookup(ArtifactRepositoryFactory.class);
ArtifactRepositoryLayout defaultArtifactRepositoryLayout =
plexusContainer.lookup(ArtifactRepositoryLayout.class, "default");
String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;
@@ -260,7 +259,7 @@ public class TestDefaultMavenReportExecutor {
new ArtifactRepositoryPolicy(true, updatePolicyFlag, checksumPolicyFlag);
String localRepoPath =
System.getProperty("localRepository", MavenCli.USER_MAVEN_CONFIGURATION_HOME.getPath() + "/repository");
- return artifactRepositoryFactory.createArtifactRepository(
+ return MavenRepositorySystem.createArtifactRepository(
"local",
Paths.get(localRepoPath).toUri().toASCIIString(),
defaultArtifactRepositoryLayout,