Interface UpgradeOptions
- All Superinterfaces:
Options
- All Known Implementing Classes:
CommonsCliUpgradeOptions
Defines the options specific to the Maven upgrade tool.
This interface extends the general
Options
interface, adding upgrade-specific configuration options.- Since:
- 4.0.0
-
Field Summary
Fields inherited from interface org.apache.maven.api.cli.Options
SOURCE_CLI
-
Method Summary
Modifier and TypeMethodDescriptionall()
Should apply all upgrade options (equivalent to --model-version 4.1.0 --infer --model --plugins).Returns the directory to use as starting point for POM discovery.force()
Should the operation be forced (ie overwrite existing files, if any).goals()
Returns the list of upgrade goals to be executed.infer()
Should use inference when upgrading (remove redundant information).model()
Should fix Maven 4 compatibility issues in POMs.Returns the target POM model version for upgrades.plugins()
Should upgrade plugins known to fail with Maven 4 to their minimum compatible versions.yes()
Should imply "yes" to all questions.Methods inherited from interface org.apache.maven.api.cli.Options
altInstallationSettings, altInstallationToolchains, altProjectSettings, altUserSettings, altUserToolchains, color, displayHelp, failOnSeverity, forceInteractive, help, interpolate, logFile, nonInteractive, offline, quiet, rawStreams, showErrors, showVersion, showVersionAndExit, source, userProperties, verbose, warnAboutDeprecatedOptions
-
Method Details
-
force
-
yes
-
goals
-
modelVersion
-
directory
-
infer
-
model
Should fix Maven 4 compatibility issues in POMs. This includes fixing unsupported combine attributes, duplicate dependencies, unsupported expressions, and other Maven 4 validation issues.- Returns:
- an
Optional
containing the boolean valuetrue
if specified, or empty
-
plugins
Should upgrade plugins known to fail with Maven 4 to their minimum compatible versions. This includes upgrading plugins like maven-exec-plugin, maven-enforcer-plugin, flatten-maven-plugin, and maven-shade-plugin to versions that work with Maven 4.- Returns:
- an
Optional
containing the boolean valuetrue
if specified, or empty
-
all
Should apply all upgrade options (equivalent to --model-version 4.1.0 --infer --model --plugins). This is a convenience option that combines model upgrade, inference, compatibility fixes, and plugin upgrades.- Returns:
- an
Optional
containing the boolean valuetrue
if specified, or empty
-