Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ArtifactHandler injection to be compatible with Maven 4 #524

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

cstamas
Copy link
Contributor

@cstamas cstamas commented Jan 15, 2025

The injected ArtifactHandler is empty one, moreover the "old" ArtifatHandler usage was mixed with Resolver ArtifactType. Dropped all that, using maven-core offered utility class instead, and redo properly the logic in case of custom class being converted to Resolver Artifact.

Locally all the build works and passes OK with latest Maven 4.

Fixes #522

The injected ArtifactHandler is empty one, moreover the
"old" ArtifatHandler use was mixed with Resolver ArtifactType.

Dropped all that, use maven-core offered utility instead, and
redo properly the logic in case of custom class being
converted to Resolver Artifact.
@ascopes
Copy link
Owner

ascopes commented Jan 15, 2025

Thanks for taking the time to look into this, greatly appreciated!

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 86.98%. Comparing base (aeff23c) to head (a269e94).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ugin/dependencies/aether/AetherArtifactMapper.java 46.16% 6 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #524      +/-   ##
==========================================
- Coverage   87.88%   86.98%   -0.89%     
==========================================
  Files          40       40              
  Lines        1336     1321      -15     
  Branches       94       95       +1     
==========================================
- Hits         1174     1149      -25     
- Misses        122      132      +10     
  Partials       40       40              
Files with missing lines Coverage Δ
...encies/aether/AetherMavenArtifactPathResolver.java 100.00% <100.00%> (ø)
...ugin/dependencies/aether/AetherArtifactMapper.java 79.49% <46.16%> (-16.80%) ⬇️

... and 1 file with indirect coverage changes

@cstamas
Copy link
Contributor Author

cstamas commented Jan 15, 2025

@ascopes feel free to take over, modify and alter this PR in any way that suits you, my goals are achieved 😄

@ascopes ascopes changed the title Drop weird injection Fix ArtifactHandler injection to be compatible with Maven 4 Jan 15, 2025
@ascopes ascopes merged commit bce5e2b into ascopes:main Jan 15, 2025
11 of 13 checks passed
@ascopes
Copy link
Owner

ascopes commented Jan 15, 2025

Will do, thanks!

@cstamas cstamas deleted the drop-weird-inject branch January 15, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Maven4 incompatibility
2 participants