Package org.apache.maven.api.model
Class Prerequisites
java.lang.Object
org.apache.maven.api.model.Prerequisites
- All Implemented Interfaces:
Serializable
,InputLocationTracker
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Prerequisites
extends Object
implements Serializable, InputLocationTracker
Describes the prerequisites a project can have.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Prerequisites instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
Prerequisites
(Prerequisites.Builder builder) Constructor for this class, to be called from its subclasses andPrerequisites.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionGets the input location that caused this model to be read.getLocation
(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.getMaven()
For a plugin project (packaging ismaven-plugin
), the minimum version of Maven required to use the resulting plugin.
In Maven 2, this was also specifying the minimum version of Maven required to build a project, but this usage is deprecated in Maven 3 and not checked any more: use the Maven Enforcer Plugin'srequireMavenVersion
rule instead.static Prerequisites.Builder
Creates a newPrerequisites
builder instance.static Prerequisites.Builder
newBuilder
(boolean withDefaults) Creates a newPrerequisites
builder instance using default values or not.static Prerequisites.Builder
newBuilder
(Prerequisites from) Creates a newPrerequisites
builder instance using the specified object as a basis.static Prerequisites.Builder
newBuilder
(Prerequisites from, boolean forceCopy) Creates a newPrerequisites
builder instance using the specified object as a basis.static Prerequisites
Creates a newPrerequisites
instance.static Prerequisites
newInstance
(boolean withDefaults) Creates a newPrerequisites
instance using default values or not.with()
Creates a new builder with this object as the basis.Creates a newPrerequisites
instance using the specified maven.
-
Constructor Details
-
Prerequisites
Constructor for this class, to be called from its subclasses andPrerequisites.Builder
.- See Also:
-
-
Method Details
-
getMaven
For a plugin project (packaging ismaven-plugin
), the minimum version of Maven required to use the resulting plugin.
In Maven 2, this was also specifying the minimum version of Maven required to build a project, but this usage is deprecated in Maven 3 and not checked any more: use the Maven Enforcer Plugin'srequireMavenVersion
rule instead.- Returns:
- a
String
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFrom
in interfaceInputLocationTracker
- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withMaven
Creates a newPrerequisites
instance using the specified maven.- Parameters:
maven
- the newString
to use- Returns:
- a
Prerequisites
with the specified maven
-
newInstance
Creates a newPrerequisites
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Prerequisites
- See Also:
-
newInstance
Creates a newPrerequisites
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Prerequisites
-
newBuilder
Creates a newPrerequisites
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newPrerequisites
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 newPrerequisites
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- thePrerequisites
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newPrerequisites
builder instance using the specified object as a basis.- Parameters:
from
- thePrerequisites
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-