[ https://issues.apache.org/jira/browse/MNG-7803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17728860#comment-17728860 ]
Tamas Cservenak edited comment on MNG-7803 at 6/2/23 8:12 PM: -------------------------------------------------------------- I'd deprecate the existing ones (emit warning and all that). {noformat} -nsu,--no-snapshot-updates Suppress SNAPSHOT updates -U,--update-snapshots Forces a check for missing releases and updated snapshots on remote repositories {noformat} Text for -nsu is totally off (should be "Supress ANY updates"), while -U is kinda conflicting with {{updatesnapshots}} as "forces check for missing releases"? Instead, introduce: * -au "always update" => behave as -U today (in maven, so set session level policy "always") * -nu "never update" => behave as -nsu today (in maven, so set session level policy "never") * alternative, maybe simpler {{-u}} that may accept policy "always", "never" so make {{-u=always}} same as -au above * and add a resolver config (new, for example {{{}aether.updateCheckManager.applyPolicy{}}}) that controls whether is update policy applied to "all" (artifact and metadata, as today) or "metadata" only (default to "metadata") This would mean, that CLI line like {{-au -Daether.updateCheckManager.applyPolicy=all}} in maven 4 would result as -U is in Maven3 today. Without resolver config, only {{-au}} would achieve exactly what we want, as resolver would default to "metadata" only, so "always update metadata" that is what we really want with version discovery. was (Author: cstamas): I'd deprecate the existing ones (emit warning and all that). {noformat} -nsu,--no-snapshot-updates Suppress SNAPSHOT updates -U,--update-snapshots Forces a check for missing releases and updated snapshots on remote repositories {noformat} Text for -nsu is totally off (should be "Supress ANY updates"), while -U is kinda conflicting with {{updatesnapshots}} as "forces check for missing releases"? Instead, introduce: * -au "always update" => behave as -U today (in maven, so set session level policy "always") * -nu "never update" => behave as -nsu today (in maven, so set session level policy "never") * alternative, maybe simpler {{-u}} that may accept policy "always", "never" so make {{-u=always}} same as -au above * and add a resolver config (new, for example {{{}aether.updateCheckManager.applyPolicy{}}}) that controls whether is update policy applied to "all" (artifact and metadata, as today) or "metadata" only (default to "metadata") This would mean, that CLI line like {{-au -Daether.updateCheckManager.applyPolicy=all}} in maven 4 would result as -U is in Maven3 today. > Deprecate -U and -nsu and provide correct options reflecting the real > behaviour > ------------------------------------------------------------------------------- > > Key: MNG-7803 > URL: https://issues.apache.org/jira/browse/MNG-7803 > Project: Maven > Issue Type: Improvement > Reporter: Guillaume Nodet > Assignee: Guillaume Nodet > Priority: Major > > The CLI options for {{-U}} and {{-nsu}} indicates that those are for > snapshots, while they actually affect version resolution, so those should be > renamed and their doc fixed. -- This message was sent by Atlassian Jira (v8.20.10#820010)