[
https://issues.apache.org/jira/browse/MNG-7802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728880#comment-17728880
]
Tamas Cservenak commented on MNG-7802:
--------------------------------------
Ok, then just for the context: the local repo was "corrupted" in a way that
resolver was unable to find the lastUpdated timestamp in otherwise healthy
file, in these cases resolver uses timestamp = 1L (1 Jan 1970 + 1ms) to signal
this. Still, the effective update policy was "never", so even so "old" file did
not trigger metadata update, that resulted in no discovery of new versions
(reported as bug).
Reason why it did not find that last updated timestamp is most probably
following: Garret used old(er) release of maven-versions-plugin, then switched
to new(er) version of same plugin. The old(er) one uses old code and bits from
maven-compat (a la Maven2), while new version of plugin was switched over to
direct use of resolver. The maven-compat and resolver use same file but
different keys to store last updated timestamp (for me due unknown reasons, but
I guess is to keep their "update cadence" completely separated).
> Fix behaviour of the maven update policy
> ----------------------------------------
>
> Key: MNG-7802
> URL: https://issues.apache.org/jira/browse/MNG-7802
> Project: Maven
> Issue Type: Bug
> Reporter: Guillaume Nodet
> Assignee: Guillaume Nodet
> Priority: Major
>
> The update policy can be specified using the {{-U}} (force update) or
> {{-nsu}} (no update) options, but those options change the whole repository
> session policy and override any settings on the repositories.
> This means that if {{-U}} is set, the resolver will attempt to check already
> downloaded artifacts. This is wrong and the behaviour has been inherited
> from maven 2.x.
> What we really wants (and what's implied by the name of the options and docs)
> is to check for new artifacts / updates, so this mainly affect _version
> resolution_ and not {_}artifact resolution{_}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)