Package org.apache.maven.api.cli.mvnup
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.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.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
-
goals
Returns the list of upgrade goals to be executed. These goals can include operations like "check", "dependencies", "plugins", etc.- Returns:
- an
Optionalcontaining the list of goals, or empty if not specified
-
modelVersion
Returns the target POM model version for upgrades. Supported values include "4.0.0" and "4.1.0".- Returns:
- an
Optionalcontaining the model version, or empty if not specified
-
directory
Returns the directory to use as starting point for POM discovery. If not specified, the current directory will be used.- Returns:
- an
Optionalcontaining the directory path, or empty if not specified
-
infer
Should use inference when upgrading (remove redundant information).- Returns:
- an
Optionalcontaining the boolean valuetrueif specified, or empty
-
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
Optionalcontaining the boolean valuetrueif 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
Optionalcontaining the boolean valuetrueif 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
Optionalcontaining the boolean valuetrueif specified, or empty
-