[MDEP-858] Replace Maven Artifact Transfer with Maven Resolver - #1668
[MDEP-858] Replace Maven Artifact Transfer with Maven Resolver#1668wilx wants to merge 6 commits into
Conversation
|
Thanks for taking this on — the coverage is impressive (413 unit tests plus the ITs on both Maven 3 and 4), and most of the migration maps cleanly onto Resolver. I ran a review focused on the behaviours that a green test suite of that shape tends not to reach: scope selection, coordinate merging, local-repository typing, and the purge fallback path. Nine points below, ordered by severity. The first two look like real regressions, and neither is visible in the current tests. 1.
|
e597448 to
740f138
Compare
|
Thanks for the detailed review. I reproduced and addressed all nine points on the rebased branch:
One shared-helper interaction also surfaced during the full IT run: Verification on the final head:
|
Replace the Maven Artifact Transfer resolvers used by dependency:get while preserving repository and artifact-type behavior. Keep the component dependency for goals that still use it. Fixes apache#1355.
… Resolver Replace Maven Artifact Transfer installation used by dependency:copy-dependencies in the repository-layout path while preserving Maven local-repository metadata, copied POMs, and snapshot behavior. Fixes apache#1355.
Replace the Maven Artifact Transfer resolvers while preserving dependency filtering, fallback resolution, and aggregated failure reporting. Re-resolve each artifact once because Resolver descriptor resolution also restores its POM. Fixes apache#1355.
Drop the unused DependableCoordinate interface from ArtifactItem and remove the now-unused Maven Artifact Transfer dependency. Keep the artifact configuration getters unchanged. Fixes apache#1355.
740f138 to
fd2706e
Compare
Keep dependency:get compatible with its historical behavior by applying the always-update policy to user-supplied repositories. Leave the existing session-controlled policy available to other ResolverUtil callers. Fixes apache#1355.
Normalize comma-separated repository entries in dependency:get and trim each alternate-repository ID, layout, and URL field before constructing Resolver repositories. Fixes apache#1355.
|
Please check my work here #1677 |
|
Closing in favour of #1680. |
Summary
Replace the remaining Maven Artifact Transfer usage with Maven Resolver APIs:
dependency:getartifact and dependency resolution;dependency:copy-dependencies;dependency:purge-local-repositoryresolution while preserving filtering, fallback resolution, and aggregated failures;ResolverUtilwith the shared Resolver operations and remove the now-unusedmaven-artifact-transferdependency andDependableCoordinateimplementation.The migration preserves custom artifact types, alternate repositories, copied POMs, snapshot base-version handling, Maven local-repository metadata, and purge fallback behavior.
Review follow-up additionally:
packagingandclassifierparameters for shortdependency:getcoordinates and validates that a version is present;go-offline;dependency:get's unconditional refresh policy for explicitly supplied repositories without changing the session-controlled policy used by otherResolverUtilcallers;Fixes #1355
Verification
nice mvn clean verify-- 432 tests, 0 failures/errors, 1 skipped; dependency analysis cleannice mvn clean -Prun-its verify-- 94 passed, 0 failures/errors, 5 JRE-conditioned skipsTestGetMojo,ResolverUtilTest, andTestCopyDependenciesMojo2run -- 41 tests, 0 failures/errors/skipsgo-offline, intermodulego-offline, and the two changed purge integration tests -- 4 passedspotless:checkpassed on every commit revision;git diff --checkpassed on the final headFollowing this checklist to help us incorporate your
contribution quickly and easily:
Note that commits might be squashed by a maintainer on merge.
This may not always be possible but is a best-practice.
mvn verifyto make sure basic checks pass.A more thorough check will be performed on your pull request automatically.
mvn -Prun-its verify).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.