You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[#9189][#9190] Fix behaviour of the maven update policy (draft) - #1144
After several iterations, this PR simply provides a custom UpdateCheckManager which can implement the desired policy : artifacts are considered immutable once downloaded from a repository. The updatePolicy defined in repositories affect the metadata retrieval only, i.e. checks for LATEST, SNAPSHOT, and more generally all version resolution requests.
This PR also fix the CLI options as part of #9190:
deprecate -nsu, --no-snapshot-updates and --update-snapshots option
Looks good, but: not good, added comment on MNG-7802 intead.
But
the CLI -U help text should be aligned with reality (is not "snapshot update" but "all update., Change the help text accordingly)
as IT failures show, IF -U present, do what happened before (stick ALWAYS to session), if not present, do partially what in this PR
Reasoning: This PR makes -U not override anymore the "remembered to fail" of resolver in local repo, as shown in ITs.
"Remembered to fail" when resolver emits Could not resolve dependencies for project org.apache.maven.its.mng4343:test:jar:0.1: The following artifacts could not be resolved: org.apache.maven.its.mng4343:dep:jar:0.1 (absent): org.apache.maven.its.mng4343:dep:jar:0.1 was not found in http://localhost:49378/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of maven-core-it has elapsed or updates are forced
gnodet
changed the title
[MNG-7802][MNG-7803] Fix behaviour of the maven update policy
[MNG-7802][MNG-7803] Fix behaviour of the maven update policy (draft)
Jun 12, 2023
gnodet
changed the title
[MNG-7802][MNG-7803] Fix behaviour of the maven update policy (draft)
[#9189][#9190] Fix behaviour of the maven update policy (draft)
Nov 9, 2026
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
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.
JIRA issue: #9189
After several iterations, this PR simply provides a custom
UpdateCheckManagerwhich can implement the desired policy : artifacts are considered immutable once downloaded from a repository. TheupdatePolicydefined in repositories affect the metadata retrieval only, i.e. checks forLATEST,SNAPSHOT, and more generally all version resolution requests.This PR also fix the CLI options as part of #9190:
-nsu,--no-snapshot-updatesand--update-snapshotsoption-U-/--update-always,-un/--update-never,-ud/--update-daily,-up/--update-policy` CLI options