Repository navigation
Drop the maven-compat test dependency - #1679
Merged
Merged
Conversation
This was referenced Aug 9, 2026
slachiewicz
force-pushed
the
agent/mdep-drop-maven-compat
branch
from
August 9, 2026 19:54
1409b87 to
3516257
Compare
slachiewicz
force-pushed
the
agent/mdep-get-test-hardening
branch
from
August 9, 2026 19:56
46046e7 to
192310d
Compare
slachiewicz
force-pushed
the
agent/mdep-drop-maven-compat
branch
from
August 9, 2026 19:58
3516257 to
3815fa0
Compare
slachiewicz
force-pushed
the
agent/mdep-drop-maven-compat
branch
from
August 9, 2026 20:28
3815fa0 to
3196c18
Compare
slachiewicz
marked this pull request as ready for review
August 9, 2026 23:15
Nothing needs LegacyRepositorySystem any more: the get goal stopped using org.apache.maven.repository.RepositorySystem in the previous commit, and that interface's only implementation is the one maven-compat supplies. The one other thing the plugin took from maven-compat is SnapshotArtifactRepositoryMetadata, copied here into the test tree rather than deleting its two usages. TestCopyDependenciesMojo2.assertArtifactExists iterates artifact.getMetadataList() and asserts a file exists, so dropping the attachment would leave that loop empty and silently remove the check. The whole hierarchy above the class is in maven-core and only the leaf is compat-only. Same approach as MPLUGIN-384. Generated-by: Claude Opus 5 (1M context)
slachiewicz
force-pushed
the
agent/mdep-drop-maven-compat
branch
from
August 10, 2026 00:06
3196c18 to
e3981ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Last piece of the three-part split of the original #1677. Now that #1677 has merged, this is rebased onto
masterand is a single commit.Nothing needs
LegacyRepositorySystemany more:dependency:getstopped using the legacyorg.apache.maven.repository.RepositorySystemin #1677, and that interface's only implementation is the onemaven-compatsupplies.I checked the dependency direction rather than assuming it. With
maven-compatremoved from the pom and the vendored class in place, butGetMojounchanged,TestCopyDependenciesMojo2passed 13/13 while all fourTestGetMojotests failed to provision the mojo — which is why this had to wait for #1677 rather than going first.The one judgement call
SnapshotArtifactRepositoryMetadatais copied into the test tree rather than deleting its two usages.TestCopyDependenciesMojo2.assertArtifactExistsiteratesartifact.getMetadataList()and asserts a file exists — dropping the attachment leaves that loop empty and silently removes the check, which is worse than vendoring.The split is upstream's own:
AbstractRepositoryMetadata,RepositoryMetadataandArtifactRepositoryMetadataare all in maven-core 3.9.x, and only this leaf lives inmaven-compat— the same situation as MPLUGIN-384. The copy matches maven-compat 3.9.16 method for method.The non-vendoring alternative, maven-core's
ArtifactRepositoryMetadata, is artifact-level metadata (storedInArtifactVersionDirectory()is false), so it would move the assertedmaven-metadatapath out of the snapshot version directory and weaken the assertion. Happy to go that way instead if the preference is to keep copied classes out of the test tree.422 unit tests pass.
Drafted with Claude — please verify