Conversation
Ability to explicitly configure checksums for download (used to validate during donwloads) and for uploads (generated during uploads). Fixes apache#1782
kwin
requested changes
Feb 3, 2026
...olver-impl/src/main/java/org/eclipse/aether/internal/impl/Maven2RepositoryLayoutFactory.java
Show resolved
Hide resolved
| CONFIG_PROPS_PREFIX + "uploadChecksumAlgorithms"; | ||
|
|
||
| /** | ||
| * Comma-separated list of checksum algorithms with which checksums are validated (downloaded) with this layout. |
Member
There was a problem hiding this comment.
Please mention which one takes precedence if both CONFIG_PROP_CHECKSUMS_ALGORITHMS and this is set.
| // explicit property for download (will be empty if not configured) | ||
| List<String> downloadChecksumsAlgorithmNames = ConfigUtils.parseCommaSeparatedUniqueNames(ConfigUtils.getString( | ||
| session, | ||
| null, |
Member
There was a problem hiding this comment.
why not passing checksumsAlgorithmNames as default.
| // explicit property for upload (will be empty if not configured) | ||
| List<String> uploadChecksumsAlgorithmNames = ConfigUtils.parseCommaSeparatedUniqueNames(ConfigUtils.getString( | ||
| session, | ||
| null, |
| CONFIG_PROP_UPLOAD_CHECKSUMS_ALGORITHMS)); | ||
|
|
||
| return new Maven2RepositoryLayout( | ||
| checksumAlgorithmFactorySelector.selectList( |
Member
There was a problem hiding this comment.
instead of implementing the fallback here I would rather do it above.
| * Returns immutable list of {@link ChecksumAlgorithmFactory} this instance of layout uses for download or upload, | ||
| * never {@code null}. The order also represents the order how remote external checksums are retrieved and | ||
| * validated (if for download). | ||
| * |
Member
Author
|
@kwin applied PR comments |
Member
Author
|
The reason I did fallback as I did, is that I wanted to detect what is set (now we do not) and maybe log something, but IMO that would be superfluous.... so am happy with it like this. |
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.
Ability to explicitly configure checksums for download (used to validate during donwloads) and for uploads (generated during uploads).
Fixes #1782