[ https://issues.apache.org/jira/browse/MRESOLVER-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726664#comment-17726664 ]
Garret Wilson commented on MRESOLVER-363: ----------------------------------------- {quote}Maven - out of the box (when user does not customize anything), the default update policy for **RELEASE** repositories is **never**. It is exactly due immutability (of releases), nothing is updated unless you say so.{quote} This still doesn't make sense to me. Indicating that something that is a "release" repository means _the artifacts within it will never change_, i.e. they will all be non-SNAPSHOT versions. To me it does not mean that _the repository itself will never change_. And it definitely doesn't mean _no one will ever add things to the repository_. In fact the idea of a "repository that can never be updated" makes no sense to me; the whole point of a repository is that you add more versions to it as more versions are available. I can see that in e.g. a security context you might want to make a repository as read-only, but _you might want to do that with a non-release, snapshot repository as well_. So it seems to me they are orthogonal concepts. And even if I accept the idea that a "release" repository means it is immutable, are we designating the machine's local repository in {{~/.m2/repository}} as a "release", immutable repository? But doesn't Maven keep {{-SNAPSHOT}} artifacts in it as well? So we are using a "release" repository to store snapshots? None of this make sense to me. {quote}maven never "sync to server", Maven does what you tell it to do via POM (you enlist all the versions).{quote} So why does Maven even have a {{resolver-status.properties}} if it never "syncs to the server"? Why would a "last-updated" matter? {quote}You are mixing in things with one specific plugin and it's goal: the versions plugin.{quote} But Versions Maven Plugin is working now if {{resolver-status.properties}} has its "last updated" flag correctly! It only fails if this is missing. (And I've explained above why this approach guarantees incorrect behavior.) How is this difficult to resolve? If we update Maven's behavior so that if {{resolver-status.properties}} is missing (or does not have the correct "last-updated" flag), then instead of doing nothing, Maven proceeds as if the "last-updated" value is January 1, 1970. Everything works as before if "last-updated" is present. If not, then the Versions Maven Plugin related bug is fixed and going forward there will be a "last-updated" flag. It's probably a single line of code (not counting brackets). What is the downside? > Maven metadata is not updated in some cases > ------------------------------------------- > > Key: MRESOLVER-363 > URL: https://issues.apache.org/jira/browse/MRESOLVER-363 > Project: Maven Resolver > Issue Type: Bug > Affects Versions: 1.9.10 > Reporter: Tamas Cservenak > Assignee: Tamas Cservenak > Priority: Major > > Seems when update check for metadata happens, and: > * maven-metadata XML is present, but > * resolver-status.properties is not, OR was created by maven-compat, that > uses different key for lastUpdated. Effectively the value of lastUpdated is > not present. > The update check falsely DO NOT check for update, as it will end up with > update policy "never" in update policy analyzer. -- This message was sent by Atlassian Jira (v8.20.10#820010)