Skip to content

Maven Upgrade Tool: remove unused --force and --yes options (Fixes #11001) - #11066

Merged
gnodet merged 2 commits into
apache:masterfrom
gnodet:mvnup-remove-force-yes-11001
Aug 29, 2025
Merged

gnodet merged 2 commits into
apache:masterfrom
gnodet:mvnup-remove-force-yes-11001

Conversation

@gnodet

@gnodet gnodet commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

This PR removes the unused --force and --yes options from the Maven Upgrade Tool (mvnup) per issue #11001.

Background

  • The mvnup help listed --force and --yes, but they were not used in the tool. The apply goal always saves changes, so showing these options was misleading.

Changes

  • Remove force() and yes() methods from UpgradeOptions API (mvnup package), as the API is not GA yet
  • Remove parsing and help text for --force/-f and --yes/-y from CommonsCliUpgradeOptions and Help
  • Remove test verifying presence of those options in help output

Notes

  • The mvnenc (encryption) tool retains its own force() and yes() options and behavior
  • No functional change to upgrade logic; only CLI surface and API cleanup for mvnup

I verified local compilation of touched files and checked that help text no longer includes the removed options. A full build could not be executed here due to transient network resolution to central; CI should validate end-to-end.

Please let me know if you would like me to open a matching PR targeting the maven-4.0.x branch as well.


Pull Request opened by Augment Code with guidance from the PR author

Fixes apache#11001

The mvnup tool displayed --force and --yes options in its help output,
but these options were never actually used by the tool. The 'apply' goal
always saves modifications without prompting, making these options
misleading to users.

Changes:
- Removed force() and yes() methods from UpgradeOptions API interface
- Removed CLI option parsing for --force/-f and --yes/-y in CommonsCliUpgradeOptions
- Removed help text for these options from both CommonsCliUpgradeOptions.displayHelp() and Help goal
- Removed test that verified these options were included in help output

The mvnenc (encryption) tool continues to use its own force() and yes()
methods as those are actually functional in that context.
@gnodet gnodet added bug Something isn't working backport-to-4.0.x labels Aug 25, 2025
Remove trailing blank lines from HelpTest.java as required by code style.
@gnodet
gnodet requested a review from Bukama August 28, 2025 13:22

@Bukama Bukama left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

@gnodet
gnodet merged commit 4b686c5 into apache:master Aug 29, 2025
@github-actions github-actions Bot added this to the 4.1.0 milestone Aug 29, 2025
gnodet added a commit to gnodet/maven that referenced this pull request Aug 29, 2025
…ache#11001) (apache#11066)

* Remove unused --force and --yes options from mvnup tool

Fixes apache#11001

The mvnup tool displayed --force and --yes options in its help output,
but these options were never actually used by the tool. The 'apply' goal
always saves modifications without prompting, making these options
misleading to users.

Changes:
- Removed force() and yes() methods from UpgradeOptions API interface
- Removed CLI option parsing for --force/-f and --yes/-y in CommonsCliUpgradeOptions
- Removed help text for these options from both CommonsCliUpgradeOptions.displayHelp() and Help goal
- Removed test that verified these options were included in help output

The mvnenc (encryption) tool continues to use its own force() and yes()
methods as those are actually functional in that context.

(cherry picked from commit 4b686c5)
@gnodet

gnodet commented Aug 29, 2025

Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
✅ maven-4.0.x

Questions ?

Please refer to the Backport tool documentation

gnodet added a commit that referenced this pull request Aug 29, 2025
…1001) (#11066) (#11079)

* Remove unused --force and --yes options from mvnup tool

Fixes #11001

The mvnup tool displayed --force and --yes options in its help output,
but these options were never actually used by the tool. The 'apply' goal
always saves modifications without prompting, making these options
misleading to users.

Changes:
- Removed force() and yes() methods from UpgradeOptions API interface
- Removed CLI option parsing for --force/-f and --yes/-y in CommonsCliUpgradeOptions
- Removed help text for these options from both CommonsCliUpgradeOptions.displayHelp() and Help goal
- Removed test that verified these options were included in help output

The mvnenc (encryption) tool continues to use its own force() and yes()
methods as those are actually functional in that context.

(cherry picked from commit 4b686c5)
@gnodet
gnodet deleted the mvnup-remove-force-yes-11001 branch October 26, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-4.0.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants