Class Metadata
java.lang.Object
org.apache.maven.artifact.repository.metadata.v4.Metadata
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Metadata
extends Object
implements Serializable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder 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 (ie.Versioning information when this directory represents "groupId/artifactId" or "groupId/artifactId/version".static Metadata.BuilderCreates a newMetadatabuilder instance.static Metadata.BuildernewBuilder(boolean withDefaults) Creates a newMetadatabuilder instance using default values or not.static Metadata.BuildernewBuilder(Metadata from) Creates a newMetadatabuilder instance using the specified object as a basis.static Metadata.BuildernewBuilder(Metadata from, boolean forceCopy) Creates a newMetadatabuilder instance using the specified object as a basis.static MetadataCreates a newMetadatainstance.static MetadatanewInstance(boolean withDefaults) Creates a newMetadatainstance using default values or not.with()Creates a new builder with this object as the basis.withArtifactId(String artifactId) Creates a newMetadatainstance using the specified artifactId.withGroupId(String groupId) Creates a newMetadatainstance using the specified groupId.withModelVersion(String modelVersion) Creates a newMetadatainstance using the specified modelVersion.withPlugins(Collection<Plugin> plugins) Creates a newMetadatainstance using the specified plugins.withVersion(String version) Creates a newMetadatainstance using the specified version.withVersioning(Versioning versioning) Creates a newMetadatainstance 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 (ie. 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 newMetadatainstance using the specified modelVersion.- Parameters:
modelVersion- the newStringto use- Returns:
- a
Metadatawith the specified modelVersion
-
withGroupId
Creates a newMetadatainstance using the specified groupId.- Parameters:
groupId- the newStringto use- Returns:
- a
Metadatawith the specified groupId
-
withArtifactId
Creates a newMetadatainstance using the specified artifactId.- Parameters:
artifactId- the newStringto use- Returns:
- a
Metadatawith the specified artifactId
-
withVersioning
Creates a newMetadatainstance using the specified versioning.- Parameters:
versioning- the newVersioningto use- Returns:
- a
Metadatawith the specified versioning
-
withVersion
Creates a newMetadatainstance using the specified version.- Parameters:
version- the newStringto use- Returns:
- a
Metadatawith the specified version
-
withPlugins
Creates a newMetadatainstance using the specified plugins.- Parameters:
plugins- the newCollection<Plugin>to use- Returns:
- a
Metadatawith the specified plugins
-
newInstance
Creates a newMetadatainstance. Equivalent tonewInstance(true).- Returns:
- a new
Metadata - See Also:
-
newInstance
Creates a newMetadatainstance 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 newMetadatabuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newMetadatabuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newMetadatabuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- theMetadatainstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newMetadatabuilder instance using the specified object as a basis.- Parameters:
from- theMetadatainstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-