Class LayeredMavenOptions<O extends MavenOptions>
java.lang.Object
org.apache.maven.cling.invoker.LayeredOptions<O>
org.apache.maven.cling.invoker.mvn.LayeredMavenOptions<O>
- Type Parameters:
O
- the specific type of Maven Options that are layered
- All Implemented Interfaces:
MavenOptions
,Options
public class LayeredMavenOptions<O extends MavenOptions>
extends LayeredOptions<O>
implements MavenOptions
Options that are "layered" by precedence order.
-
Field Summary
Fields inherited from class org.apache.maven.cling.invoker.LayeredOptions
options
Fields inherited from interface org.apache.maven.api.cli.Options
SOURCE_CLI
-
Constructor Summary
-
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 ofMavenOptions
with values interpolated using the given properties.static MavenOptions
layerMavenOptions
(Collection<MavenOptions> options) 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 class org.apache.maven.cling.invoker.LayeredOptions
altInstallationSettings, altInstallationToolchains, altProjectSettings, altUserSettings, altUserToolchains, collectListIfPresentOrEmpty, collectMapIfPresentOrEmpty, color, displayHelp, failOnSeverity, forceInteractive, help, logFile, nonInteractive, quiet, rawStreams, returnFirstPresentOrEmpty, showErrors, showVersion, showVersionAndExit, source, userProperties, verbose, warnAboutDeprecatedOptions
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
-
Constructor Details
-
LayeredMavenOptions
-
-
Method Details
-
layerMavenOptions
-
alternatePomFile
Description copied from interface:MavenOptions
Returns the path to an alternate POM file.- Specified by:
alternatePomFile
in interfaceMavenOptions
- Returns:
- an
Optional
containing the path to the alternate POM file, or empty if not specified
-
offline
Description copied from interface:MavenOptions
Indicates whether Maven should operate in offline mode.- Specified by:
offline
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if offline mode is enabled, false if disabled, or empty if not specified
-
nonRecursive
Description copied from interface:MavenOptions
Indicates whether Maven should operate in non-recursive mode (i.e., not build child modules).- Specified by:
nonRecursive
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if non-recursive mode is enabled, false if disabled, or empty if not specified
-
updateSnapshots
Description copied from interface:MavenOptions
Indicates whether Maven should force a check for updated snapshots on remote repositories.- Specified by:
updateSnapshots
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if snapshot updates should be forced, false if not, or empty if not specified
-
activatedProfiles
Description copied from interface:MavenOptions
Returns the list of profiles to activate.- Specified by:
activatedProfiles
in interfaceMavenOptions
- Returns:
- an
Optional
containing the list of profile names to activate, or empty if not specified
-
suppressSnapshotUpdates
Description copied from interface:MavenOptions
Indicates whether Maven should suppress SNAPSHOT updates.- Specified by:
suppressSnapshotUpdates
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if SNAPSHOT updates should be suppressed, false if not, or empty if not specified
-
strictChecksums
Description copied from interface:MavenOptions
Indicates whether Maven should use strict checksum verification.- Specified by:
strictChecksums
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if strict checksum verification is enabled, false if not, or empty if not specified
-
relaxedChecksums
Description copied from interface:MavenOptions
Indicates whether Maven should use relaxed checksum verification.- Specified by:
relaxedChecksums
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if relaxed checksum verification is enabled, false if not, or empty if not specified
-
failFast
Description copied from interface:MavenOptions
Indicates whether Maven should stop at the first failure in a multi-module build.- Specified by:
failFast
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if Maven should stop at the first failure, false if not, or empty if not specified
-
failAtEnd
Description copied from interface:MavenOptions
Indicates whether Maven should run all builds but defer error reporting to the end.- Specified by:
failAtEnd
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if error reporting should be deferred to the end, false if not, or empty if not specified
-
failNever
Description copied from interface:MavenOptions
Indicates whether Maven should never fail the build, regardless of project result.- Specified by:
failNever
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if the build should never fail, false if it should fail normally, or empty if not specified
-
resume
Description copied from interface:MavenOptions
Indicates whether Maven should resume from the last failed project in a previous build.- Specified by:
resume
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if Maven should resume from the last failure, false if not, or empty if not specified
-
resumeFrom
Description copied from interface:MavenOptions
Returns the project to resume the build from.- Specified by:
resumeFrom
in interfaceMavenOptions
- Returns:
- an
Optional
containing the project name to resume from, or empty if not specified
-
projects
Description copied from interface:MavenOptions
Returns the list of specified reactor projects to build instead of all projects.- Specified by:
projects
in interfaceMavenOptions
- Returns:
- an
Optional
containing the list of project names to build, or empty if not specified
-
alsoMake
Description copied from interface:MavenOptions
Indicates whether Maven should also build the specified projects' dependencies.- Specified by:
alsoMake
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if dependencies should also be built, false if not, or empty if not specified
-
alsoMakeDependents
Description copied from interface:MavenOptions
Indicates whether Maven should also build the specified projects' dependents.- Specified by:
alsoMakeDependents
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if dependents should also be built, false if not, or empty if not specified
-
threads
Description copied from interface:MavenOptions
Returns the number of threads used for parallel builds.- Specified by:
threads
in interfaceMavenOptions
- Returns:
- an
Optional
containing the number of threads (or "1C" for one thread per CPU core), or empty if not specified
-
builder
Description copied from interface:MavenOptions
Returns the id of the build strategy to use.- Specified by:
builder
in interfaceMavenOptions
- Returns:
- an
Optional
containing the id of the build strategy, or empty if not specified
-
noTransferProgress
Description copied from interface:MavenOptions
Indicates whether Maven should not display transfer progress when downloading or uploading.- Specified by:
noTransferProgress
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if transfer progress should not be displayed, false if it should, or empty if not specified
-
cacheArtifactNotFound
Description copied from interface:MavenOptions
Indicates whether Maven should cache the "not found" status of artifacts that were not found in remote repositories.- Specified by:
cacheArtifactNotFound
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if "not found" status should be cached, false if not, or empty if not specified
-
strictArtifactDescriptorPolicy
Description copied from interface:MavenOptions
Indicates whether Maven should use strict artifact descriptor policy.- Specified by:
strictArtifactDescriptorPolicy
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if strict artifact descriptor policy should be used, false if not, or empty if not specified
-
ignoreTransitiveRepositories
Description copied from interface:MavenOptions
Indicates whether Maven should ignore transitive repositories.- Specified by:
ignoreTransitiveRepositories
in interfaceMavenOptions
- Returns:
- an
Optional
containing true if transitive repositories should be ignored, false if not, or empty if not specified
-
goals
Description copied from interface:MavenOptions
Returns the list of goals and phases to execute.- Specified by:
goals
in interfaceMavenOptions
- Returns:
- an
Optional
containing the list of goals and phases to execute, or empty if not specified
-
interpolate
Description copied from interface:MavenOptions
Returns a new instance ofMavenOptions
with values interpolated using the given properties.- Specified by:
interpolate
in interfaceMavenOptions
- Specified by:
interpolate
in interfaceOptions
- Parameters:
properties
- a collection of property maps to use for interpolation- Returns:
- a new MavenOptions instance with interpolated values
-