Skip to content

Drop the legacy local repository from the executor request and its test - #158

Open
slachiewicz wants to merge 2 commits into
masterfrom
drop-maven-compat
Open

Drop the legacy local repository from the executor request and its test#158
slachiewicz wants to merge 2 commits into
masterfrom
drop-maven-compat

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Aug 8, 2026

Copy link
Copy Markdown
Member

MavenReportExecutorRequest.localRepository, deprecated in MSHARED-1207, is read by nothing. Removing it lets the test drop the legacy repository plumbing as well: the request populator already builds the ArtifactRepositorypopulateFromSettings takes the path from the effective settings, populateDefaults falls back to ~/.m2/repository, which is the value the test was assembling by hand out of MavenCli.USER_MAVEN_CONFIGURATION_HOME. Only surefire's localRepository override stays applied by hand, and it has to: ASF Jenkins builds this with mavenLocalRepo: '.repository', so the build's repository is not the user's. The version goes to 2.1.0-SNAPSHOT, since dropping public API is not a patch release.

The report assertions move to MavenReport.getOutputPath(), which reporting-api 4.0.0 added as a default method returning getOutputName(). That takes the test's deprecation warnings from 8 to 3; the rest are structural — every Maven 3 MavenSession constructor is deprecated, and populateFromSettings has no Maven 3 replacement.

maven-compat has to stay while mavenVersion is 3.6.3: maven-core 3.6.3 injects the legacy org.apache.maven.repository.RepositorySystem into DefaultProjectBuildingHelper and only maven-compat implements it, so without the dependency 3 of the 4 tests fail with No implementation for org.apache.maven.repository.RepositorySystem was bound. maven-core moved that field to MavenRepositorySystem in 3.9.12, which is what a removal would cost; a pom comment records that instead.

maven-javadoc-plugin 3.4.0 needed RepositoryMetadataManager, also maven-compat-only, so the pin moves to 3.12.0.

Verified: mvn verify → 4 tests and 5 ITs, 0 failures.

This change was created with AI assistance.

@slachiewicz slachiewicz added dependencies Pull requests that update a dependency file breaking Pull requests that break existing features labels Aug 8, 2026
@slachiewicz
slachiewicz requested a lite review from Copilot August 8, 2026 17:36

This comment was marked as resolved.

@slachiewicz
slachiewicz marked this pull request as draft August 9, 2026 21:21
@slachiewicz
slachiewicz deleted the drop-maven-compat branch August 10, 2026 20:38
@slachiewicz
slachiewicz restored the drop-maven-compat branch August 16, 2026 10:46
@slachiewicz slachiewicz reopened this Aug 16, 2026
@slachiewicz

This comment was marked as outdated.

@slachiewicz
slachiewicz marked this pull request as ready for review August 16, 2026 10:57
@slachiewicz slachiewicz changed the title Remove maven-compat, which needed three things rather than one Remove maven-compat and raise the Maven baseline to 3.9.12 Aug 22, 2026
@slachiewicz slachiewicz changed the title Remove maven-compat and raise the Maven baseline to 3.9.12 Drop the legacy local repository from the executor request and its test Aug 23, 2026
@slachiewicz slachiewicz added java Pull requests that update Java code removed Pull requests that remove features and removed dependencies Pull requests that update a dependency file labels Aug 23, 2026
MavenReportExecutorRequest.localRepository, deprecated in MSHARED-1207,
is read by nothing. Removing it lets the test drop the legacy repository
plumbing too: the request populator already builds the ArtifactRepository
-- populateFromSettings takes the path from the effective settings,
populateDefaults falls back to the user default. Only surefire's
localRepository override stays applied by hand, because ASF Jenkins builds
with mavenLocalRepo '.repository'. The version goes to 2.1.0-SNAPSHOT,
since dropping public API is not a patch release.

The report assertions move to MavenReport.getOutputPath(), which
reporting-api 4.0.0 added as a default method returning getOutputName().
Deprecation warnings in the test go 8 to 3; the rest are structural,
since every Maven 3 MavenSession constructor is deprecated and
populateFromSettings has no Maven 3 replacement.

maven-compat stays while mavenVersion is 3.6.3: maven-core 3.6.3 injects
the legacy org.apache.maven.repository.RepositorySystem into
DefaultProjectBuildingHelper and only maven-compat implements it. The
field moved to MavenRepositorySystem in maven-core 3.9.12.

maven-javadoc-plugin 3.4.0 needed RepositoryMetadataManager, also
maven-compat-only, so the pin moves to 3.12.0.
@slawekjaranowski

Copy link
Copy Markdown
Member

Is it not simillary to - #159 ?

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

Labels

breaking Pull requests that break existing features java Pull requests that update Java code removed Pull requests that remove features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants