gnodet opened a new issue, #13851: URL: https://github.com/apache/maven/issues/13851
## Background The `-U` / `--update-snapshots` CLI flag and the corresponding `MavenOptions.updateSnapshots()` / `MavenExecutionRequest.isUpdateSnapshots()` API have always been slightly misnamed. The flag actually: 1. Forces a remote check for **missing releases** (not yet locally cached) 2. Forces a remote check for **updated snapshots** It does **not** re-download release artifacts already present in the local repository. This was clarified in documentation by PR #13849, which also prompted this discussion. ## Problem The name `updateSnapshots` implies snapshot-only behavior, misleading users into thinking `-U` has no effect on release resolution. In practice, it is a *force remote update check* flag that applies to both release and snapshot artifact resolution. Notably, the new resolver-2.x update policy CLI (`--update-always`, introduced recently) already uses a better name that correctly reflects the intent. ## Proposal - Deprecate `MavenOptions.updateSnapshots()` and `MavenExecutionRequest.isUpdateSnapshots()`/`setUpdateSnapshots()` in favor of a better-named equivalent (e.g. `forceUpdateChecks()`) - Keep `--update-snapshots` / `-U` as a deprecated alias for backward compatibility (it has 20+ years of muscle memory behind it) - Align the API name with the existing `--update-always` CLI option introduced by the resolver 2.x update policy work - Document clearly in the deprecated methods what the flag actually does ## Considerations - `-U` / `--update-snapshots` is deeply ingrained in Maven users' muscle memory — the CLI alias must be preserved - This is a public API change; a deprecation cycle is required before removal - Maven 3.9.x keeps the same name → any rename is master/4.x only - The behavioral change is zero — this is purely naming/API hygiene ## Related - PR #13849 — documentation clarification (immediate fix) - The `--update-always` option already exists as the better-named equivalent at the CLI level -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
