Package org.apache.maven.api.cli.mvn
Interface MavenOptions
- All Superinterfaces:
Options
- All Known Implementing Classes:
CommonsCliMavenOptions,LayeredMavenOptions
Defines the options specific to Maven operations.
This interface extends the general
Options interface, adding Maven-specific configuration options.
These options represent the various flags and settings available through the Maven CLI,
as well as those that can be specified in the maven.config file. They provide fine-grained
control over Maven's behavior during the build process.
- Since:
- 4.0.0
-
Field Summary
Fields inherited from interface org.apache.maven.api.cli.Options
SOURCE_CLI -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of profiles to activate.alsoMake()Indicates whether Maven should also build the specified projects' dependencies.Indicates whether Maven should also build the specified projects' dependents.Returns the path to an alternate POM file.builder()Returns the id of the build strategy to use.Indicates whether Maven should cache the "not found" status of artifacts that were not found in remote repositories.Indicates whether Maven should run all builds but defer error reporting to the end.failFast()Indicates whether Maven should stop at the first failure in a multi-module build.Indicates whether Maven should never fail the build, regardless of project result.goals()Returns the list of goals and phases to execute.Indicates whether Maven should ignore transitive repositories.interpolate(Collection<Map<String, String>> properties) Returns a new instance ofMavenOptionswith values interpolated using the given properties.Indicates whether Maven should operate in non-recursive mode (i.e., not build child modules).Indicates whether Maven should not display transfer progress when downloading or uploading.offline()Indicates whether Maven should operate in offline mode.projects()Returns the list of specified reactor projects to build instead of all projects.Indicates whether Maven should use relaxed checksum verification.resume()Indicates whether Maven should resume from the last failed project in a previous build.Returns the project to resume the build from.Indicates whether Maven should use strict artifact descriptor policy.Indicates whether Maven should use strict checksum verification.Indicates whether Maven should suppress SNAPSHOT updates.threads()Returns the number of threads used for parallel builds.Indicates whether Maven should force a check for updated snapshots on remote repositories.Methods inherited from interface org.apache.maven.api.cli.Options
altInstallationSettings, altInstallationToolchains, altProjectSettings, altUserSettings, altUserToolchains, color, displayHelp, failOnSeverity, forceInteractive, help, logFile, nonInteractive, quiet, rawStreams, showErrors, showVersion, showVersionAndExit, source, userProperties, verbose, warnAboutDeprecatedOptions
-
Method Details
-
alternatePomFile
Returns the path to an alternate POM file.- Returns:
- an
Optionalcontaining the path to the alternate POM file, or empty if not specified
-
offline
Indicates whether Maven should operate in offline mode.- Returns:
- an
Optionalcontaining true if offline mode is enabled, false if disabled, or empty if not specified
-
nonRecursive
Indicates whether Maven should operate in non-recursive mode (i.e., not build child modules).- Returns:
- an
Optionalcontaining true if non-recursive mode is enabled, false if disabled, or empty if not specified
-
updateSnapshots
Indicates whether Maven should force a check for updated snapshots on remote repositories.- Returns:
- an
Optionalcontaining true if snapshot updates should be forced, false if not, or empty if not specified
-
activatedProfiles
Returns the list of profiles to activate.- Returns:
- an
Optionalcontaining the list of profile names to activate, or empty if not specified
-
suppressSnapshotUpdates
Indicates whether Maven should suppress SNAPSHOT updates.- Returns:
- an
Optionalcontaining true if SNAPSHOT updates should be suppressed, false if not, or empty if not specified
-
strictChecksums
Indicates whether Maven should use strict checksum verification.- Returns:
- an
Optionalcontaining true if strict checksum verification is enabled, false if not, or empty if not specified
-
relaxedChecksums
Indicates whether Maven should use relaxed checksum verification.- Returns:
- an
Optionalcontaining true if relaxed checksum verification is enabled, false if not, or empty if not specified
-
failFast
Indicates whether Maven should stop at the first failure in a multi-module build.- Returns:
- an
Optionalcontaining true if Maven should stop at the first failure, false if not, or empty if not specified
-
failAtEnd
Indicates whether Maven should run all builds but defer error reporting to the end.- Returns:
- an
Optionalcontaining true if error reporting should be deferred to the end, false if not, or empty if not specified
-
failNever
Indicates whether Maven should never fail the build, regardless of project result.- Returns:
- an
Optionalcontaining true if the build should never fail, false if it should fail normally, or empty if not specified
-
resume
Indicates whether Maven should resume from the last failed project in a previous build.- Returns:
- an
Optionalcontaining true if Maven should resume from the last failure, false if not, or empty if not specified
-
resumeFrom
Returns the project to resume the build from.- Returns:
- an
Optionalcontaining the project name to resume from, or empty if not specified
-
projects
Returns the list of specified reactor projects to build instead of all projects.- Returns:
- an
Optionalcontaining the list of project names to build, or empty if not specified
-
alsoMake
Indicates whether Maven should also build the specified projects' dependencies.- Returns:
- an
Optionalcontaining true if dependencies should also be built, false if not, or empty if not specified
-
alsoMakeDependents
Indicates whether Maven should also build the specified projects' dependents.- Returns:
- an
Optionalcontaining true if dependents should also be built, false if not, or empty if not specified
-
threads
Returns the number of threads used for parallel builds.- Returns:
- an
Optionalcontaining the number of threads (or "1C" for one thread per CPU core), or empty if not specified
-
builder
Returns the id of the build strategy to use.- Returns:
- an
Optionalcontaining the id of the build strategy, or empty if not specified
-
noTransferProgress
Indicates whether Maven should not display transfer progress when downloading or uploading.- Returns:
- an
Optionalcontaining true if transfer progress should not be displayed, false if it should, or empty if not specified
-
cacheArtifactNotFound
Indicates whether Maven should cache the "not found" status of artifacts that were not found in remote repositories.- Returns:
- an
Optionalcontaining true if "not found" status should be cached, false if not, or empty if not specified
-
strictArtifactDescriptorPolicy
Indicates whether Maven should use strict artifact descriptor policy.- Returns:
- an
Optionalcontaining true if strict artifact descriptor policy should be used, false if not, or empty if not specified
-
ignoreTransitiveRepositories
Indicates whether Maven should ignore transitive repositories.- Returns:
- an
Optionalcontaining true if transitive repositories should be ignored, false if not, or empty if not specified
-
goals
Returns the list of goals and phases to execute.- Returns:
- an
Optionalcontaining the list of goals and phases to execute, or empty if not specified
-
interpolate
Returns a new instance ofMavenOptionswith values interpolated using the given properties.- Specified by:
interpolatein interfaceOptions- Parameters:
properties- a collection of property maps to use for interpolation- Returns:
- a new MavenOptions instance with interpolated values
-