[
https://issues.apache.org/jira/browse/MRESOLVER-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17731705#comment-17731705
]
ASF GitHub Bot commented on MRESOLVER-369:
------------------------------------------
cstamas commented on PR #297:
URL: https://github.com/apache/maven-resolver/pull/297#issuecomment-1587741095
PR is on-hold: testing shows that now when Maven "remembers" that Artifact
cannot be downloaded, there is no way to get out of it (-U does not help, as
policy is not applied to artifact by default anymore, before it simply went
here as -U was "always", and implicitly cleared the error flags as well, so it
"fixed" things).
IMO, this stems from the fact that policy ALWAYS was simply misused on Maven
side (-U), and instead, "force update" on maven side may mean something else,
like:
* set update policy to ALWAYS
* set cache not found/transfer to false
* ... (what else?)
> Expose configuration for update check manager where to apply policy
> -------------------------------------------------------------------
>
> Key: MRESOLVER-369
> URL: https://issues.apache.org/jira/browse/MRESOLVER-369
> Project: Maven Resolver
> Issue Type: New Feature
> Components: Resolver
> Reporter: Tamas Cservenak
> Assignee: Tamas Cservenak
> Priority: Major
> Fix For: 1.9.11
>
>
> Currently, DefaultUpdateCheckManager ALWAYS applies policy to both, artifacts
> and metadata. This causes problems when we want to "discover new versions"
> (or similar use case, that relies on fresh metadata), but metadata is never
> updated due remote repository update policy of "never", so only -U make it
> work as expected. -U OTOH is like shooting with cannon onto bird, as it
> updates many many more as well, not only the one metadata we are interested
> in.
> Moreover, since Maven3 artifacts are immutable.
> So, add a config like {{aether.updateCheckManager.applyUpdatePolicy}} that
> accepts values "all" (like today) and "metadata" (does not applies policy to
> artifacts, if artifact present, no update needed).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)