Class Activation

java.lang.Object
org.apache.maven.api.model.Activation
All Implemented Interfaces:
Serializable, InputLocationTracker

The conditions within the build runtime environment which will trigger the automatic inclusion of the build profile. Multiple conditions can be defined, which must be all satisfied to activate the profile.
See Also:
  • Method Details Link icon

    • isActiveByDefault Link icon

      public boolean isActiveByDefault()
      If set to true, this profile will be active unless another profile in this pom is activated using the command line -P option or by one of that profile's activators.
      Returns:
      a boolean
    • getJdk Link icon

      public String getJdk()
      Specifies that this profile will be activated when a matching JDK is detected. For example, 1.4 only activates on JDKs versioned 1.4, while !1.4 matches any JDK that is not version 1.4. Ranges are supported too: [1.5,) activates when the JDK is 1.5 minimum.
      Returns:
      a String
    • getOs Link icon

      public ActivationOS getOs()
      Specifies that this profile will be activated when matching operating system attributes are detected.
      Returns:
      a ActivationOS
    • getProperty Link icon

      public ActivationProperty getProperty()
      Specifies that this profile will be activated when this property is specified.
      Returns:
      a ActivationProperty
    • getFile Link icon

      public ActivationFile getFile()
      Specifies that this profile will be activated based on existence of a file.
      Returns:
      a ActivationFile
    • getLocation Link icon

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with Link icon

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withActiveByDefault Link icon

      @Nonnull public Activation withActiveByDefault(boolean activeByDefault)
      Creates a new Activation instance using the specified activeByDefault.
      Parameters:
      activeByDefault - the new boolean to use
      Returns:
      a Activation with the specified activeByDefault
    • withJdk Link icon

      @Nonnull public Activation withJdk(String jdk)
      Creates a new Activation instance using the specified jdk.
      Parameters:
      jdk - the new String to use
      Returns:
      a Activation with the specified jdk
    • withOs Link icon

      @Nonnull public Activation withOs(ActivationOS os)
      Creates a new Activation instance using the specified os.
      Parameters:
      os - the new ActivationOS to use
      Returns:
      a Activation with the specified os
    • withProperty Link icon

      @Nonnull public Activation withProperty(ActivationProperty property)
      Creates a new Activation instance using the specified property.
      Parameters:
      property - the new ActivationProperty to use
      Returns:
      a Activation with the specified property
    • withFile Link icon

      @Nonnull public Activation withFile(ActivationFile file)
      Creates a new Activation instance using the specified file.
      Parameters:
      file - the new ActivationFile to use
      Returns:
      a Activation with the specified file
    • newInstance Link icon

      @Nonnull public static Activation newInstance()
      Creates a new Activation instance. Equivalent to newInstance(true).
      Returns:
      a new Activation
      See Also:
    • newInstance Link icon

      @Nonnull public static Activation newInstance(boolean withDefaults)
      Creates a new Activation instance using default values or not. Equivalent to newBuilder(withDefaults).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Activation
    • newBuilder Link icon

      @Nonnull public static Activation.Builder newBuilder()
      Creates a new Activation builder instance. Equivalent to newBuilder(true).
      Returns:
      a new Builder
      See Also:
    • newBuilder Link icon

      @Nonnull public static Activation.Builder newBuilder(boolean withDefaults)
      Creates a new Activation builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder Link icon

      @Nonnull public static Activation.Builder newBuilder(Activation from)
      Creates a new Activation builder instance using the specified object as a basis. Equivalent to newBuilder(from, false).
      Parameters:
      from - the Activation instance to use as a basis
      Returns:
      a new Builder
    • newBuilder Link icon

      @Nonnull public static Activation.Builder newBuilder(Activation from, boolean forceCopy)
      Creates a new Activation builder instance using the specified object as a basis.
      Parameters:
      from - the Activation instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder