Package org.apache.maven.execution
Class ProfileActivation
java.lang.Object
org.apache.maven.execution.ProfileActivation
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Mark a profile as optional and activated.void
Mark a profile as required and activated.void
addProfileActivation
(String id, boolean active, boolean optional) Adds a profile activation to the request.void
Mark a profile as optional and deactivated.void
Mark a profile as required and deactivated.Deprecated.Deprecated.UsegetRequiredInactiveProfileIds()
andgetOptionalInactiveProfileIds()
instead.void
overwriteActiveProfiles
(List<String> activeProfileIds) Deprecated.UseactivateOptionalProfile(String)
oractivateRequiredProfile(String)
instead.void
overwriteInactiveProfiles
(List<String> inactiveProfileIds) Deprecated.UsedeactivateOptionalProfile(String)
ordeactivateRequiredProfile(String)
instead.
-
Constructor Details
-
ProfileActivation
public ProfileActivation()
-
-
Method Details
-
getActiveProfiles
Deprecated.UsegetRequiredActiveProfileIds()
andgetOptionalActiveProfileIds()
instead.Mimics the pre-Maven 4 "active profiles" list. -
getInactiveProfiles
Deprecated.UsegetRequiredInactiveProfileIds()
andgetOptionalInactiveProfileIds()
instead.Mimics the pre-Maven 4 "inactive profiles" list. -
overwriteActiveProfiles
Deprecated.UseactivateOptionalProfile(String)
oractivateRequiredProfile(String)
instead.Overwrites the active profiles based on a pre-Maven 4 "active profiles" list.- Parameters:
activeProfileIds
- AList
of profile IDs that must be activated.
-
overwriteInactiveProfiles
Deprecated.UsedeactivateOptionalProfile(String)
ordeactivateRequiredProfile(String)
instead.Overwrites the inactive profiles based on a pre-Maven 4 "inactive profiles" list.- Parameters:
inactiveProfileIds
- AList
of profile IDs that must be deactivated.
-
activateRequiredProfile
Mark a profile as required and activated.- Parameters:
id
- The identifier of the profile.
-
activateOptionalProfile
Mark a profile as optional and activated.- Parameters:
id
- The identifier of the profile.
-
deactivateRequiredProfile
Mark a profile as required and deactivated.- Parameters:
id
- The identifier of the profile.
-
deactivateOptionalProfile
Mark a profile as optional and deactivated.- Parameters:
id
- The identifier of the profile.
-
addProfileActivation
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
- Returns:
- Required active profile identifiers, never
null
.
-
getOptionalActiveProfileIds
- Returns:
- Optional active profile identifiers, never
null
.
-
getRequiredInactiveProfileIds
- Returns:
- Required inactive profile identifiers, never
null
.
-
getOptionalInactiveProfileIds
- Returns:
- Optional inactive profile identifiers, never
null
.
-
getRequiredActiveProfileIds()
andgetOptionalActiveProfileIds()
instead.