Class Versioning
java.lang.Object
org.apache.maven.api.metadata.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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Versioning instances. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVersioning(Versioning.Builder builder) Constructor for this class, to be called from its subclasses andVersioning.Builder. - 
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.BuilderCreates a newVersioningbuilder instance.static Versioning.BuildernewBuilder(boolean withDefaults) Creates a newVersioningbuilder instance using default values or not.static Versioning.BuildernewBuilder(Versioning from) Creates a newVersioningbuilder instance using the specified object as a basis.static Versioning.BuildernewBuilder(Versioning from, boolean forceCopy) Creates a newVersioningbuilder instance using the specified object as a basis.static VersioningCreates a newVersioninginstance.static VersioningnewInstance(boolean withDefaults) Creates a newVersioninginstance using default values or not.with()Creates a new builder with this object as the basis.withLastUpdated(String lastUpdated) Creates a newVersioninginstance using the specified lastUpdated.withLatest(String latest) Creates a newVersioninginstance using the specified latest.withRelease(String release) Creates a newVersioninginstance using the specified release.withSnapshot(Snapshot snapshot) Creates a newVersioninginstance using the specified snapshot.withSnapshotVersions(Collection<SnapshotVersion> snapshotVersions) Creates a newVersioninginstance using the specified snapshotVersions.withVersions(Collection<String> versions) Creates a newVersioninginstance using the specified versions. 
- 
Constructor Details
- 
Versioning
Constructor for this class, to be called from its subclasses andVersioning.Builder.- See Also:
 
 
 - 
 - 
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
 - 
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 newVersioninginstance using the specified latest.- Parameters:
 latest- the newStringto use- Returns:
 - a 
Versioningwith the specified latest 
 - 
withRelease
Creates a newVersioninginstance using the specified release.- Parameters:
 release- the newStringto use- Returns:
 - a 
Versioningwith the specified release 
 - 
withVersions
Creates a newVersioninginstance using the specified versions.- Parameters:
 versions- the newCollection<String>to use- Returns:
 - a 
Versioningwith the specified versions 
 - 
withLastUpdated
Creates a newVersioninginstance using the specified lastUpdated.- Parameters:
 lastUpdated- the newStringto use- Returns:
 - a 
Versioningwith the specified lastUpdated 
 - 
withSnapshot
Creates a newVersioninginstance using the specified snapshot.- Parameters:
 snapshot- the newSnapshotto use- Returns:
 - a 
Versioningwith the specified snapshot 
 - 
withSnapshotVersions
Creates a newVersioninginstance using the specified snapshotVersions.- Parameters:
 snapshotVersions- the newCollection<SnapshotVersion>to use- Returns:
 - a 
Versioningwith the specified snapshotVersions 
 - 
newInstance
Creates a newVersioninginstance. Equivalent tonewInstance(true).- Returns:
 - a new 
Versioning - See Also:
 
 - 
newInstance
Creates a newVersioninginstance 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 newVersioningbuilder instance. Equivalent tonewBuilder(true).- Returns:
 - a new 
Builder - See Also:
 
 - 
newBuilder
Creates a newVersioningbuilder instance using default values or not.- Parameters:
 withDefaults- the boolean indicating whether default values should be used- Returns:
 - a new 
Builder 
 - 
newBuilder
Creates a newVersioningbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
 from- theVersioninginstance to use as a basis- Returns:
 - a new 
Builder 
 - 
newBuilder
Creates a newVersioningbuilder instance using the specified object as a basis.- Parameters:
 from- theVersioninginstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
 - a new 
Builder 
 
 -