Class ActivationFile

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

This is the file specification used to activate the profile. The missing value is the location of a file that needs to exist, and if it doesn't, the profile will be activated. On the other hand, exists will test for the existence of the file and if it is there, the profile will be activated.
Variable interpolation for these file specifications is limited to ${basedir}, system properties and user properties.
See Also:
  • Method Details

    • getMissing

      public String getMissing()
      The name of the file that must be missing to activate the profile.
      Returns:
      a String
    • getExists

      public String getExists()
      The name of the file that must exist to activate the profile.
      Returns:
      a String
    • getLocation

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

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withMissing

      @Nonnull public ActivationFile withMissing(String missing)
      Creates a new ActivationFile instance using the specified missing.
      Parameters:
      missing - the new String to use
      Returns:
      a ActivationFile with the specified missing
    • withExists

      @Nonnull public ActivationFile withExists(String exists)
      Creates a new ActivationFile instance using the specified exists.
      Parameters:
      exists - the new String to use
      Returns:
      a ActivationFile with the specified exists
    • newInstance

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

      @Nonnull public static ActivationFile newInstance(boolean withDefaults)
      Creates a new ActivationFile 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 ActivationFile
    • newBuilder

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

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

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

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