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
Modifier and TypeClassDescriptionstatic class
Builder class used to create Activation instances. -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Specifies that this profile will be activated based on existence of a file.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.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.boolean
Flag specifying whether this profile is active as a default.static Activation.Builder
Creates a newActivation
builder instance.static Activation.Builder
newBuilder
(boolean withDefaults) Creates a newActivation
builder instance using default values or not.static Activation.Builder
newBuilder
(Activation from) Creates a newActivation
builder instance using the specified object as a basis.static Activation.Builder
newBuilder
(Activation from, boolean forceCopy) Creates a newActivation
builder instance using the specified object as a basis.static Activation
Creates a newActivation
instance.static Activation
newInstance
(boolean withDefaults) Creates a newActivation
instance using default values or not.with()
Creates a new builder with this object as the basis.withActiveByDefault
(boolean activeByDefault) Creates a newActivation
instance using the specified activeByDefault.withFile
(ActivationFile file) Creates a newActivation
instance using the specified file.Creates a newActivation
instance using the specified jdk.withOs
(ActivationOS os) Creates a newActivation
instance using the specified os.withPackaging
(String packaging) Creates a newActivation
instance using the specified packaging.withProperty
(ActivationProperty property) Creates a newActivation
instance using the specified property.
-
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
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withActiveByDefault
Creates a newActivation
instance using the specified activeByDefault.- Parameters:
activeByDefault
- the newboolean
to use- Returns:
- a
Activation
with the specified activeByDefault
-
withJdk
Creates a newActivation
instance using the specified jdk.- Parameters:
jdk
- the newString
to use- Returns:
- a
Activation
with the specified jdk
-
withOs
Creates a newActivation
instance using the specified os.- Parameters:
os
- the newActivationOS
to use- Returns:
- a
Activation
with the specified os
-
withProperty
Creates a newActivation
instance using the specified property.- Parameters:
property
- the newActivationProperty
to use- Returns:
- a
Activation
with the specified property
-
withFile
Creates a newActivation
instance using the specified file.- Parameters:
file
- the newActivationFile
to use- Returns:
- a
Activation
with the specified file
-
withPackaging
Creates a newActivation
instance using the specified packaging.- Parameters:
packaging
- the newString
to use- Returns:
- a
Activation
with the specified packaging
-
newInstance
Creates a newActivation
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Activation
- See Also:
-
newInstance
Creates a newActivation
instance 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 newActivation
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newActivation
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newActivation
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theActivation
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newActivation
builder instance using the specified object as a basis.- Parameters:
from
- theActivation
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-