Class Versioning
java.lang.Object
org.apache.maven.artifact.repository.metadata.v4.Versioning
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class Versioning
extends Object
implements Serializable
Versioning information for "groupId/artifactId" or "groupId/artifactId/version" SNAPSHOT
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create Versioning instances. -
Method Summary
Modifier and TypeMethodDescriptionWhen the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories).What the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only)What the last version added to the directory is, for the releases only ("groupId/artifactId" directory only)The current snapshot data in use for this version ("groupId/artifactId/version" only)Information for each sub-artifact available in this artifact snapshot.Versions available of the artifact (both releases and snapshots) ("groupId/artifactId" directory only)static Versioning.Builder
Creates a newVersioning
builder instance.static Versioning.Builder
newBuilder
(boolean withDefaults) Creates a newVersioning
builder instance using default values or not.static Versioning.Builder
newBuilder
(Versioning from) Creates a newVersioning
builder instance using the specified object as a basis.static Versioning.Builder
newBuilder
(Versioning from, boolean forceCopy) Creates a newVersioning
builder instance using the specified object as a basis.static Versioning
Creates a newVersioning
instance.static Versioning
newInstance
(boolean withDefaults) Creates a newVersioning
instance using default values or not.with()
Creates a new builder with this object as the basis.withLastUpdated
(String lastUpdated) Creates a newVersioning
instance using the specified lastUpdated.withLatest
(String latest) Creates a newVersioning
instance using the specified latest.withRelease
(String release) Creates a newVersioning
instance using the specified release.withSnapshot
(Snapshot snapshot) Creates a newVersioning
instance using the specified snapshot.withSnapshotVersions
(Collection<SnapshotVersion> snapshotVersions) Creates a newVersioning
instance using the specified snapshotVersions.withVersions
(Collection<String> versions) Creates a newVersioning
instance using the specified versions.
-
Method Details
-
getLatest
What the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only)- Returns:
- a
String
-
getRelease
What the last version added to the directory is, for the releases only ("groupId/artifactId" directory only)- Returns:
- a
String
-
getVersions
Versions available of the artifact (both releases and snapshots) ("groupId/artifactId" directory only)- Returns:
- a
List<String>
-
getLastUpdated
When the metadata was last updated (both "groupId/artifactId" and "groupId/artifactId/version" directories). The timestamp is expressed using UTC in the format yyyyMMddHHmmss.- Returns:
- a
String
-
getSnapshot
The current snapshot data in use for this version ("groupId/artifactId/version" only)- Returns:
- a
Snapshot
-
getSnapshotVersions
Information for each sub-artifact available in this artifact snapshot. This is only the most recent SNAPSHOT for each unique extension/classifier combination.- Returns:
- a
List<SnapshotVersion>
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withLatest
Creates a newVersioning
instance using the specified latest.- Parameters:
latest
- the newString
to use- Returns:
- a
Versioning
with the specified latest
-
withRelease
Creates a newVersioning
instance using the specified release.- Parameters:
release
- the newString
to use- Returns:
- a
Versioning
with the specified release
-
withVersions
Creates a newVersioning
instance using the specified versions.- Parameters:
versions
- the newCollection<String>
to use- Returns:
- a
Versioning
with the specified versions
-
withLastUpdated
Creates a newVersioning
instance using the specified lastUpdated.- Parameters:
lastUpdated
- the newString
to use- Returns:
- a
Versioning
with the specified lastUpdated
-
withSnapshot
Creates a newVersioning
instance using the specified snapshot.- Parameters:
snapshot
- the newSnapshot
to use- Returns:
- a
Versioning
with the specified snapshot
-
withSnapshotVersions
Creates a newVersioning
instance using the specified snapshotVersions.- Parameters:
snapshotVersions
- the newCollection<SnapshotVersion>
to use- Returns:
- a
Versioning
with the specified snapshotVersions
-
newInstance
Creates a newVersioning
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
Versioning
- See Also:
-
newInstance
Creates a newVersioning
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Versioning
-
newBuilder
Creates a newVersioning
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newVersioning
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 newVersioning
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- theVersioning
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newVersioning
builder instance using the specified object as a basis.- Parameters:
from
- theVersioning
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-