Enum Class ApiRunner.SecurityMode

java.lang.Object
java.lang.Enum<ApiRunner.SecurityMode>
org.apache.maven.impl.standalone.ApiRunner.SecurityMode
All Implemented Interfaces:
Serializable, Comparable<ApiRunner.SecurityMode>, Constable
Enclosing class:
ApiRunner

public static enum ApiRunner.SecurityMode extends Enum<ApiRunner.SecurityMode>
Controls how the standalone session handles settings encryption/decryption.

Maven settings (settings.xml) may contain encrypted server passwords. Decryption requires the plexus-sec-dispatcher library on the classpath. This enum lets callers control the behavior when dispatchers are (or are not) available.

Since:
4.0.0
  • Enum Constant Details

    • NONE

      public static final ApiRunner.SecurityMode NONE
      Do not attempt to configure security dispatchers. Encrypted passwords are passed through as-is.
    • IF_AVAILABLE

      public static final ApiRunner.SecurityMode IF_AVAILABLE
      Try to configure security dispatchers; silently skip if the required classes are not on the classpath.
    • IF_AVAILABLE_WARN

      public static final ApiRunner.SecurityMode IF_AVAILABLE_WARN
      Try to configure security dispatchers; warn to System.err if the required classes are not on the classpath. This is the default.
    • REQUIRED

      public static final ApiRunner.SecurityMode REQUIRED
      Security dispatchers are required; throw MavenException if they cannot be configured.
  • Method Details

    • values

      public static ApiRunner.SecurityMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ApiRunner.SecurityMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null