Class ProfileActivation

java.lang.Object
org.apache.maven.execution.ProfileActivation

public class ProfileActivation extends Object
Container for storing the request from the user to activate or de-activate certain profiles and optionally fail the build if those profiles do not exist.
  • Constructor Details

    • ProfileActivation

      public ProfileActivation()
  • Method Details

    • getActiveProfiles

      @Deprecated public List<String> getActiveProfiles()
      Mimics the pre-Maven 4 "active profiles" list.
    • getInactiveProfiles

      @Deprecated public List<String> getInactiveProfiles()
      Mimics the pre-Maven 4 "inactive profiles" list.
    • overwriteActiveProfiles

      @Deprecated public void overwriteActiveProfiles(List<String> activeProfileIds)
      Overwrites the active profiles based on a pre-Maven 4 "active profiles" list.
      Parameters:
      activeProfileIds - A List of profile IDs that must be activated.
    • overwriteInactiveProfiles

      @Deprecated public void overwriteInactiveProfiles(List<String> inactiveProfileIds)
      Overwrites the inactive profiles based on a pre-Maven 4 "inactive profiles" list.
      Parameters:
      inactiveProfileIds - A List of profile IDs that must be deactivated.
    • activateRequiredProfile

      public void activateRequiredProfile(String id)
      Mark a profile as required and activated.
      Parameters:
      id - The identifier of the profile.
    • activateOptionalProfile

      public void activateOptionalProfile(String id)
      Mark a profile as optional and activated.
      Parameters:
      id - The identifier of the profile.
    • deactivateRequiredProfile

      public void deactivateRequiredProfile(String id)
      Mark a profile as required and deactivated.
      Parameters:
      id - The identifier of the profile.
    • deactivateOptionalProfile

      public void deactivateOptionalProfile(String id)
      Mark a profile as optional and deactivated.
      Parameters:
      id - The identifier of the profile.
    • addProfileActivation

      public void addProfileActivation(String id, boolean active, boolean optional)
      Adds a profile activation to the request.
      Parameters:
      id - The identifier of the profile.
      active - Should the profile be activated?
      optional - Can the build continue if the profile does not exist?
    • getRequiredActiveProfileIds

      public Set<String> getRequiredActiveProfileIds()
      Returns:
      Required active profile identifiers, never null.
    • getOptionalActiveProfileIds

      public Set<String> getOptionalActiveProfileIds()
      Returns:
      Optional active profile identifiers, never null.
    • getRequiredInactiveProfileIds

      public Set<String> getRequiredInactiveProfileIds()
      Returns:
      Required inactive profile identifiers, never null.
    • getOptionalInactiveProfileIds

      public Set<String> getOptionalInactiveProfileIds()
      Returns:
      Optional inactive profile identifiers, never null.