[MDEP-858] Replace Maven Artifact Transfer with Maven Resolver - #1668
[MDEP-858] Replace Maven Artifact Transfer with Maven Resolver#1668wilx wants to merge 4 commits into
Conversation
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. Part of 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. Part of 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. Part of apache#1355
Drop the unused DependableCoordinate interface from ArtifactItem and remove the now-unused Maven Artifact Transfer dependency. Keep the artifact configuration getters unchanged. Part of apache#1355
| * @author <a href="mailto:brianf@apache.org">Brian Fox</a> | ||
| * @since 1.0 | ||
| */ | ||
| public class ArtifactItem implements DependableCoordinate { |
There was a problem hiding this comment.
This is probably an incompatible change that requires a major version bump
There was a problem hiding this comment.
Are plugin's themselves considered API? We wouldn't be able to make any changes if they were impossible to change.
There was a problem hiding this comment.
Public means public. Hyrum's Law applies.
You can make changes. Just make sure they're compatible.
There was a problem hiding this comment.
This is necessary if we are to move forward with this task. It at least keeps most of the source compatibility. People can deal with this. They should not be using plugin internal classes anyway.
| BuildContext buildContext, | ||
| MavenProject project, | ||
| ResolverUtil resolverUtil, | ||
| RepositoryManager repositoryManager, |
There was a problem hiding this comment.
This ctor has already changed from no args to some args from 3.8.1 to 3.9.0. Ctors or even the mojo implementation classes should not be considered API. That's unreasonable for this project and its ability to evolve. This moves the project forward. You will have to do this one way or another eventually.
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.
Fixes #1355
Verification
mvn verify— 413 tests, 0 failures/errors, 1 skippedmvn verify— 413 tests, 0 failures/errors, 1 skippedmvn -Prun-its verify— 94 passed, 0 failures/errors, 5 JRE skipsFollowing 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.