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.
  • Constructor Details

    • LayeredMavenOptions

      protected LayeredMavenOptions(List<O> options)
  • Method Details

    • layerMavenOptions

      public static MavenOptions layerMavenOptions(Collection<MavenOptions> options)
    • alternatePomFile

      public Optional<String> alternatePomFile()
      Description copied from interface: MavenOptions
      Returns the path to an alternate POM file.
      Specified by:
      alternatePomFile in interface MavenOptions
      Returns:
      an Optional containing the path to the alternate POM file, or empty if not specified
    • offline

      public Optional<Boolean> offline()
      Description copied from interface: MavenOptions
      Indicates whether Maven should operate in offline mode.
      Specified by:
      offline in interface MavenOptions
      Returns:
      an Optional containing true if offline mode is enabled, false if disabled, or empty if not specified
    • nonRecursive

      public Optional<Boolean> 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 interface MavenOptions
      Returns:
      an Optional containing true if non-recursive mode is enabled, false if disabled, or empty if not specified
    • updateSnapshots

      public Optional<Boolean> updateSnapshots()
      Description copied from interface: MavenOptions
      Indicates whether Maven should force a check for updated snapshots on remote repositories.
      Specified by:
      updateSnapshots in interface MavenOptions
      Returns:
      an Optional containing true if snapshot updates should be forced, false if not, or empty if not specified
    • activatedProfiles

      public Optional<List<String>> activatedProfiles()
      Description copied from interface: MavenOptions
      Returns the list of profiles to activate.
      Specified by:
      activatedProfiles in interface MavenOptions
      Returns:
      an Optional containing the list of profile names to activate, or empty if not specified
    • suppressSnapshotUpdates

      public Optional<Boolean> suppressSnapshotUpdates()
      Description copied from interface: MavenOptions
      Indicates whether Maven should suppress SNAPSHOT updates.
      Specified by:
      suppressSnapshotUpdates in interface MavenOptions
      Returns:
      an Optional containing true if SNAPSHOT updates should be suppressed, false if not, or empty if not specified
    • strictChecksums

      public Optional<Boolean> strictChecksums()
      Description copied from interface: MavenOptions
      Indicates whether Maven should use strict checksum verification.
      Specified by:
      strictChecksums in interface MavenOptions
      Returns:
      an Optional containing true if strict checksum verification is enabled, false if not, or empty if not specified
    • relaxedChecksums

      public Optional<Boolean> relaxedChecksums()
      Description copied from interface: MavenOptions
      Indicates whether Maven should use relaxed checksum verification.
      Specified by:
      relaxedChecksums in interface MavenOptions
      Returns:
      an Optional containing true if relaxed checksum verification is enabled, false if not, or empty if not specified
    • failFast

      public Optional<Boolean> failFast()
      Description copied from interface: MavenOptions
      Indicates whether Maven should stop at the first failure in a multi-module build.
      Specified by:
      failFast in interface MavenOptions
      Returns:
      an Optional containing true if Maven should stop at the first failure, false if not, or empty if not specified
    • failAtEnd

      public Optional<Boolean> failAtEnd()
      Description copied from interface: MavenOptions
      Indicates whether Maven should run all builds but defer error reporting to the end.
      Specified by:
      failAtEnd in interface MavenOptions
      Returns:
      an Optional containing true if error reporting should be deferred to the end, false if not, or empty if not specified
    • failNever

      public Optional<Boolean> failNever()
      Description copied from interface: MavenOptions
      Indicates whether Maven should never fail the build, regardless of project result.
      Specified by:
      failNever in interface MavenOptions
      Returns:
      an Optional containing true if the build should never fail, false if it should fail normally, or empty if not specified
    • resume

      public Optional<Boolean> resume()
      Description copied from interface: MavenOptions
      Indicates whether Maven should resume from the last failed project in a previous build.
      Specified by:
      resume in interface MavenOptions
      Returns:
      an Optional containing true if Maven should resume from the last failure, false if not, or empty if not specified
    • resumeFrom

      public Optional<String> resumeFrom()
      Description copied from interface: MavenOptions
      Returns the project to resume the build from.
      Specified by:
      resumeFrom in interface MavenOptions
      Returns:
      an Optional containing the project name to resume from, or empty if not specified
    • projects

      public Optional<List<String>> projects()
      Description copied from interface: MavenOptions
      Returns the list of specified reactor projects to build instead of all projects.
      Specified by:
      projects in interface MavenOptions
      Returns:
      an Optional containing the list of project names to build, or empty if not specified
    • alsoMake

      public Optional<Boolean> alsoMake()
      Description copied from interface: MavenOptions
      Indicates whether Maven should also build the specified projects' dependencies.
      Specified by:
      alsoMake in interface MavenOptions
      Returns:
      an Optional containing true if dependencies should also be built, false if not, or empty if not specified
    • alsoMakeDependents

      public Optional<Boolean> alsoMakeDependents()
      Description copied from interface: MavenOptions
      Indicates whether Maven should also build the specified projects' dependents.
      Specified by:
      alsoMakeDependents in interface MavenOptions
      Returns:
      an Optional containing true if dependents should also be built, false if not, or empty if not specified
    • threads

      public Optional<String> threads()
      Description copied from interface: MavenOptions
      Returns the number of threads used for parallel builds.
      Specified by:
      threads in interface MavenOptions
      Returns:
      an Optional containing the number of threads (or "1C" for one thread per CPU core), or empty if not specified
    • builder

      public Optional<String> builder()
      Description copied from interface: MavenOptions
      Returns the id of the build strategy to use.
      Specified by:
      builder in interface MavenOptions
      Returns:
      an Optional containing the id of the build strategy, or empty if not specified
    • noTransferProgress

      public Optional<Boolean> noTransferProgress()
      Description copied from interface: MavenOptions
      Indicates whether Maven should not display transfer progress when downloading or uploading.
      Specified by:
      noTransferProgress in interface MavenOptions
      Returns:
      an Optional containing true if transfer progress should not be displayed, false if it should, or empty if not specified
    • cacheArtifactNotFound

      public Optional<Boolean> 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 interface MavenOptions
      Returns:
      an Optional containing true if "not found" status should be cached, false if not, or empty if not specified
    • strictArtifactDescriptorPolicy

      public Optional<Boolean> strictArtifactDescriptorPolicy()
      Description copied from interface: MavenOptions
      Indicates whether Maven should use strict artifact descriptor policy.
      Specified by:
      strictArtifactDescriptorPolicy in interface MavenOptions
      Returns:
      an Optional containing true if strict artifact descriptor policy should be used, false if not, or empty if not specified
    • ignoreTransitiveRepositories

      public Optional<Boolean> ignoreTransitiveRepositories()
      Description copied from interface: MavenOptions
      Indicates whether Maven should ignore transitive repositories.
      Specified by:
      ignoreTransitiveRepositories in interface MavenOptions
      Returns:
      an Optional containing true if transitive repositories should be ignored, false if not, or empty if not specified
    • goals

      public Optional<List<String>> goals()
      Description copied from interface: MavenOptions
      Returns the list of goals and phases to execute.
      Specified by:
      goals in interface MavenOptions
      Returns:
      an Optional containing the list of goals and phases to execute, or empty if not specified
    • interpolate

      public MavenOptions interpolate(Collection<Map<String,String>> properties)
      Description copied from interface: MavenOptions
      Returns a new instance of MavenOptions with values interpolated using the given properties.
      Specified by:
      interpolate in interface MavenOptions
      Specified by:
      interpolate in interface Options
      Parameters:
      properties - a collection of property maps to use for interpolation
      Returns:
      a new MavenOptions instance with interpolated values