Package org.apache.maven.model.building
Class ModelData
java.lang.Object
org.apache.maven.model.building.ModelData
Holds a model along with some auxiliary information. This internal utility class assists the model builder during POM
processing by providing a means to transport information that cannot be (easily) extracted from the model itself.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelData
(ModelSource source, Model model) Creates a new container for the specified model.Creates a new container for the specified model. -
Method Summary
Modifier and TypeMethodDescriptionGets the active profiles from the model.Gets the effective artifact identifier of the model.Gets the effective group identifier of the model.getId()
Gets the effective identifier of the model in the form<groupId>:<artifactId>:<version>
.getModel()
Gets the model being wrapped.Gets the raw model being wrapped.Gets the effective version of the model.void
setActiveProfiles
(List<Profile> activeProfiles) Sets the active profiles from the model.void
setArtifactId
(String artifactId) Sets the effective artifact identifier of the model.void
setGroupId
(String groupId) Sets the effective group identifier of the model.void
Sets the model being wrapped.void
setRawModel
(Model rawModel) Sets the raw model being wrapped.void
setVersion
(String version) Sets the effective version of the model.toString()
-
Field Details
-
source
-
model
-
rawModel
-
activeProfiles
-
groupId
-
artifactId
-
version
-
-
Constructor Details
-
ModelData
ModelData(ModelSource source, Model model) Creates a new container for the specified model.- Parameters:
model
- The model to wrap, may benull
.
-
ModelData
ModelData(ModelSource source, Model model, String groupId, String artifactId, String version) Creates a new container for the specified model.- Parameters:
model
- The model to wrap, may benull
.groupId
- The effective group identifier of the model, may benull
.artifactId
- The effective artifact identifier of the model, may benull
.version
- The effective version of the model, may benull
.
-
-
Method Details
-
getSource
-
getModel
Gets the model being wrapped.- Returns:
- The model or
null
if not set.
-
setModel
Sets the model being wrapped.- Parameters:
model
- The model, may benull
.
-
getRawModel
Gets the raw model being wrapped.- Returns:
- The raw model or
null
if not set.
-
setRawModel
Sets the raw model being wrapped.- Parameters:
rawModel
- The raw model, may benull
.
-
getActiveProfiles
Gets the active profiles from the model.- Returns:
- The active profiles or
null
if not set.
-
setActiveProfiles
Sets the active profiles from the model.- Parameters:
activeProfiles
- The active profiles, may benull
.
-
getGroupId
Gets the effective group identifier of the model.- Returns:
- The effective group identifier of the model or an empty string if unknown, never
null
.
-
setGroupId
Sets the effective group identifier of the model.- Parameters:
groupId
- The effective group identifier of the model, may benull
.
-
getArtifactId
Gets the effective artifact identifier of the model.- Returns:
- The effective artifact identifier of the model or an empty string if unknown, never
null
.
-
setArtifactId
Sets the effective artifact identifier of the model.- Parameters:
artifactId
- The effective artifact identifier of the model, may benull
.
-
getVersion
Gets the effective version of the model.- Returns:
- The effective version of the model or an empty string if unknown, never
null
.
-
setVersion
Sets the effective version of the model.- Parameters:
version
- The effective version of the model, may benull
.
-
getId
Gets the effective identifier of the model in the form<groupId>:<artifactId>:<version>
.- Returns:
- The effective identifier of the model, never
null
.
-
toString
-