Package org.apache.maven.api.metadata
Class Metadata
java.lang.Object
org.apache.maven.api.metadata.Metadata
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Metadata
extends Object
implements Serializable
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Metadata instances. -
Method Summary
Modifier and TypeMethodDescriptionThe artifactId when this directory represents "groupId/artifactId" or "groupId/artifactId/version".The groupId when this directory represents "groupId/artifactId" or "groupId/artifactId/version".The version of the underlying metadata model.The set of plugins when this directory represents a "groupId".The base version (i.e.Versioning information when this directory represents "groupId/artifactId" or "groupId/artifactId/version".static Metadata.Builder
Creates a newMetadata
builder instance.static Metadata.Builder
newBuilder
(boolean withDefaults) Creates a newMetadata
builder instance using default values or not.static Metadata.Builder
newBuilder
(Metadata from) Creates a newMetadata
builder instance using the specified object as a basis.static Metadata.Builder
newBuilder
(Metadata from, boolean forceCopy) Creates a newMetadata
builder instance using the specified object as a basis.static Metadata
Creates a newMetadata
instance.static Metadata
newInstance
(boolean withDefaults) Creates a newMetadata
instance using default values or not.with()
Creates a new builder with this object as the basis.withArtifactId
(String artifactId) Creates a newMetadata
instance using the specified artifactId.withGroupId
(String groupId) Creates a newMetadata
instance using the specified groupId.withModelVersion
(String modelVersion) Creates a newMetadata
instance using the specified modelVersion.withPlugins
(Collection<Plugin> plugins) Creates a newMetadata
instance using the specified plugins.withVersion
(String version) Creates a newMetadata
instance using the specified version.withVersioning
(Versioning versioning) Creates a newMetadata
instance using the specified versioning.
-
Method Details
-
getNamespaceUri
-
getModelEncoding
-
getModelVersion
The version of the underlying metadata model.- Returns:
- a
String
-
getGroupId
The groupId when this directory represents "groupId/artifactId" or "groupId/artifactId/version".- Returns:
- a
String
-
getArtifactId
The artifactId when this directory represents "groupId/artifactId" or "groupId/artifactId/version".- Returns:
- a
String
-
getVersioning
Versioning information when this directory represents "groupId/artifactId" or "groupId/artifactId/version".- Returns:
- a
Versioning
-
getVersion
The base version (i.e. ending in-SNAPSHOT
) when this directory represents a "groupId/artifactId/version" for a SNAPSHOT.- Returns:
- a
String
-
getPlugins
The set of plugins when this directory represents a "groupId".- Returns:
- a
List<Plugin>
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withModelVersion
Creates a newMetadata
instance using the specified modelVersion.- Parameters:
modelVersion
- the newString
to use- Returns:
- a
Metadata
with the specified modelVersion
-
withGroupId
Creates a newMetadata
instance using the specified groupId.- Parameters:
groupId
- the newString
to use- Returns:
- a
Metadata
with the specified groupId
-
withArtifactId
Creates a newMetadata
instance using the specified artifactId.- Parameters:
artifactId
- the newString
to use- Returns:
- a
Metadata
with the specified artifactId
-
withVersioning
Creates a newMetadata
instance using the specified versioning.- Parameters:
versioning
- the newVersioning
to use- Returns:
- a
Metadata
with the specified versioning
-
withVersion
Creates a newMetadata
instance using the specified version.- Parameters:
version
- the newString
to use- Returns:
- a
Metadata
with the specified version
-
withPlugins
Creates a newMetadata
instance using the specified plugins.- Parameters:
plugins
- the newCollection<Plugin>
to use- Returns:
- a
Metadata
with the specified plugins
-
newInstance
Creates a newMetadata
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Metadata
- See Also:
-
newInstance
Creates a newMetadata
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Metadata
-
newBuilder
Creates a newMetadata
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newMetadata
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 newMetadata
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theMetadata
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newMetadata
builder instance using the specified object as a basis.- Parameters:
from
- theMetadata
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-