Maven Upgrade Tool: remove unused --force and --yes options (Fixes #11001)#11066
Merged
gnodet merged 2 commits intoapache:masterfrom Aug 29, 2025
Merged
Maven Upgrade Tool: remove unused --force and --yes options (Fixes #11001)#11066gnodet merged 2 commits intoapache:masterfrom
gnodet merged 2 commits intoapache:masterfrom
Conversation
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.
Remove trailing blank lines from HelpTest.java as required by code style.
cstamas
approved these changes
Aug 28, 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)
Contributor
Author
💚 All backports created successfully
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the unused
--forceand--yesoptions from the Maven Upgrade Tool (mvnup) per issue #11001.Background
--forceand--yes, but they were not used in the tool. Theapplygoal always saves changes, so showing these options was misleading.Changes
force()andyes()methods fromUpgradeOptionsAPI (mvnup package), as the API is not GA yet--force/-fand--yes/-yfromCommonsCliUpgradeOptionsandHelpNotes
force()andyes()options and behaviorI 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.xbranch as well.Pull Request opened by Augment Code with guidance from the PR author