Package org.apache.maven.api.settings
Class Activation
java.lang.Object
org.apache.maven.api.settings.Activation
- All Implemented Interfaces:
Serializable,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Activation
extends Object
implements Serializable, InputLocationTracker
The conditions within the build runtime environment which will trigger
the automatic inclusion of the parent build profile.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Activation instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedActivation(Activation.Builder builder) Constructor for this class, to be called from its subclasses andActivation.Builder. -
Method Summary
Modifier and TypeMethodDescriptionThe condition which must be satisfied to activate the profile.getFile()Specifies that this profile will be activated based on existence of a file.Gets the input location that caused this model to be read.getJdk()Specifies that this profile will be activated when a matching JDK is detected.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.getOs()Specifies that this profile will be activated when matching OS attributes are detected.Specifies that this profile will be activated based on the project's packaging.Specifies that this profile will be activated when this property is specified.booleanFlag specifying whether this profile is active as a default.static Activation.BuilderCreates a newActivationbuilder instance.static Activation.BuildernewBuilder(boolean withDefaults) Creates a newActivationbuilder instance using default values or not.static Activation.BuildernewBuilder(Activation from) Creates a newActivationbuilder instance using the specified object as a basis.static Activation.BuildernewBuilder(Activation from, boolean forceCopy) Creates a newActivationbuilder instance using the specified object as a basis.static ActivationCreates a newActivationinstance.static ActivationnewInstance(boolean withDefaults) Creates a newActivationinstance using default values or not.with()Creates a new builder with this object as the basis.withActiveByDefault(boolean activeByDefault) Creates a newActivationinstance using the specified activeByDefault.withCondition(String condition) Creates a newActivationinstance using the specified condition.withFile(ActivationFile file) Creates a newActivationinstance using the specified file.Creates a newActivationinstance using the specified jdk.withOs(ActivationOS os) Creates a newActivationinstance using the specified os.withPackaging(String packaging) Creates a newActivationinstance using the specified packaging.withProperty(ActivationProperty property) Creates a newActivationinstance using the specified property.
-
Constructor Details
-
Activation
Constructor for this class, to be called from its subclasses andActivation.Builder.- See Also:
-
-
Method Details
-
isActiveByDefault
public boolean isActiveByDefault()Flag specifying whether this profile is active as a default.- Returns:
- a
boolean
-
getJdk
Specifies that this profile will be activated when a matching JDK is detected.- Returns:
- a
String
-
getOs
Specifies that this profile will be activated when matching OS attributes are detected.- Returns:
- a
ActivationOS
-
getProperty
Specifies that this profile will be activated when this property is specified.- Returns:
- a
ActivationProperty
-
getFile
Specifies that this profile will be activated based on existence of a file.- Returns:
- a
ActivationFile
-
getPackaging
Specifies that this profile will be activated based on the project's packaging.- Returns:
- a
String
-
getCondition
The condition which must be satisfied to activate the profile.- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getLocationKeyStream
-
getImportedFrom
Gets the input location that caused this model to be read. -
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withActiveByDefault
Creates a newActivationinstance using the specified activeByDefault.- Parameters:
activeByDefault- the newbooleanto use- Returns:
- a
Activationwith the specified activeByDefault
-
withJdk
Creates a newActivationinstance using the specified jdk.- Parameters:
jdk- the newStringto use- Returns:
- a
Activationwith the specified jdk
-
withOs
Creates a newActivationinstance using the specified os.- Parameters:
os- the newActivationOSto use- Returns:
- a
Activationwith the specified os
-
withProperty
Creates a newActivationinstance using the specified property.- Parameters:
property- the newActivationPropertyto use- Returns:
- a
Activationwith the specified property
-
withFile
Creates a newActivationinstance using the specified file.- Parameters:
file- the newActivationFileto use- Returns:
- a
Activationwith the specified file
-
withPackaging
Creates a newActivationinstance using the specified packaging.- Parameters:
packaging- the newStringto use- Returns:
- a
Activationwith the specified packaging
-
withCondition
Creates a newActivationinstance using the specified condition.- Parameters:
condition- the newStringto use- Returns:
- a
Activationwith the specified condition
-
newInstance
Creates a newActivationinstance. Equivalent tonewInstance(true).- Returns:
- a new
Activation - See Also:
-
newInstance
Creates a newActivationinstance using default values or not. Equivalent tonewBuilder(withDefaults).build().- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Activation
-
newBuilder
Creates a newActivationbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newActivationbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newActivationbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theActivationinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newActivationbuilder instance using the specified object as a basis.- Parameters:
from- theActivationinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-