Class ProjectActivation
java.lang.Object
org.apache.maven.execution.ProjectActivation
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
ProjectActivationSettings -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
activateOptionalProject
(String selector) Mark a project as optional and activated.void
activateOptionalProjectNonRecursive
(String selector) Mark a project as optional and activated.void
activateRequiredProject
(String selector) Mark a project as required and activated.void
addProjectActivation
(String selector, boolean active, boolean optional) Adds a project activation to the request.void
deactivateOptionalProject
(String selector) Mark a project as optional and deactivated.void
deactivateRequiredProject
(String selector) Mark a project as required and deactivated.Deprecated.Deprecated.UsegetRequiredActiveProjectSelectors()
andgetOptionalActiveProjectSelectors()
instead.boolean
isEmpty()
void
overwriteActiveProjects
(List<String> activeProjectSelectors) Deprecated.UseactivateOptionalProject(String)
oractivateRequiredProject(String)
instead.void
overwriteInactiveProjects
(List<String> inactiveProjectSelectors) Deprecated.UsedeactivateOptionalProject(String)
ordeactivateRequiredProject(String)
instead.
-
Constructor Details
-
ProjectActivation
public ProjectActivation()
-
-
Method Details
-
getActivations
-
addProjectActivation
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
-
getOptionalActiveProjectSelectors
-
getRequiredInactiveProjectSelectors
-
getOptionalInactiveProjectSelectors
-
getSelectedProjects
Deprecated.UsegetRequiredActiveProjectSelectors()
andgetOptionalActiveProjectSelectors()
instead.Mimics the pre-Maven 4 "selected projects" list. -
getExcludedProjects
Deprecated.Mimics the pre-Maven 4 "excluded projects" list. -
overwriteActiveProjects
Deprecated.UseactivateOptionalProject(String)
oractivateRequiredProject(String)
instead.Overwrites the active projects based on a pre-Maven 4 "active projects" list.- Parameters:
activeProjectSelectors
- AList
of project selectors that must be activated.
-
overwriteInactiveProjects
Deprecated.UsedeactivateOptionalProject(String)
ordeactivateRequiredProject(String)
instead.Overwrites the inactive projects based on a pre-Maven 4 "inactive projects" list.- Parameters:
inactiveProjectSelectors
- AList
of project selectors that must be deactivated.
-
activateRequiredProject
Mark a project as required and activated.- Parameters:
selector
- The selector of the project.
-
activateOptionalProject
Mark a project as optional and activated.- Parameters:
selector
- The selector of the project.
-
activateOptionalProjectNonRecursive
Mark a project as optional and activated.- Parameters:
selector
- The selector of the project.
-
deactivateRequiredProject
Mark a project as required and deactivated.- Parameters:
selector
- The selector of the project.
-
deactivateOptionalProject
Mark a project as optional and deactivated.- Parameters:
selector
- The selector of the project.
-
isEmpty
public boolean isEmpty()
-
getRequiredInactiveProjectSelectors()
andgetOptionalInactiveProjectSelectors()
instead.