Class ProjectActivation

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

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

    • ProjectActivation

      public ProjectActivation()
  • Method Details

    • addProjectActivation

      public void addProjectActivation(String selector, boolean active, boolean optional)
      Adds a project activation to the request.
      Parameters:
      selector - The selector of the project.
      active - Should the project be activated?
      optional - Can the build continue if the project does not exist?
    • getRequiredActiveProjectSelectors

      public Set<String> getRequiredActiveProjectSelectors()
      Returns:
      Required active project selectors, never null.
    • getOptionalActiveProjectSelectors

      public Set<String> getOptionalActiveProjectSelectors()
      Returns:
      Optional active project selectors, never null.
    • getRequiredInactiveProjectSelectors

      public Set<String> getRequiredInactiveProjectSelectors()
      Returns:
      Required inactive project selectors, never null.
    • getOptionalInactiveProjectSelectors

      public Set<String> getOptionalInactiveProjectSelectors()
      Returns:
      Optional inactive project selectors, never null.
    • getSelectedProjects

      @Deprecated public List<String> getSelectedProjects()
      Mimics the pre-Maven 4 "selected projects" list.
    • getExcludedProjects

      @Deprecated public List<String> getExcludedProjects()
      Mimics the pre-Maven 4 "excluded projects" list.
    • overwriteActiveProjects

      @Deprecated public void overwriteActiveProjects(List<String> activeProjectSelectors)
      Overwrites the active projects based on a pre-Maven 4 "active projects" list.
      Parameters:
      activeProjectSelectors - A List of project selectors that must be activated.
    • overwriteInactiveProjects

      @Deprecated public void overwriteInactiveProjects(List<String> inactiveProjectSelectors)
      Overwrites the inactive projects based on a pre-Maven 4 "inactive projects" list.
      Parameters:
      inactiveProjectSelectors - A List of project selectors that must be deactivated.
    • activateRequiredProject

      public void activateRequiredProject(String selector)
      Mark a project as required and activated.
      Parameters:
      selector - The selector of the project.
    • activateOptionalProject

      public void activateOptionalProject(String selector)
      Mark a project as optional and activated.
      Parameters:
      selector - The selector of the project.
    • deactivateRequiredProject

      public void deactivateRequiredProject(String selector)
      Mark a project as required and deactivated.
      Parameters:
      selector - The selector of the project.
    • deactivateOptionalProject

      public void deactivateOptionalProject(String selector)
      Mark a project as optional and deactivated.
      Parameters:
      selector - The selector of the project.
    • isEmpty

      public boolean isEmpty()