Package org.apache.maven.api.metadata
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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create Versioning instances.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedVersioning(Versioning.Builder builder) Constructor for this class, to be called from its subclasses andVersioning.Builder.
- 
Method SummaryModifier 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- 
VersioningConstructor for this class, to be called from its subclasses andVersioning.Builder.- See Also:
 
 
- 
- 
Method Details- 
getLatestWhat the last version added to the directory is, including both releases and snapshots ("groupId/artifactId" directory only)- Returns:
- a String
 
- 
getReleaseWhat the last version added to the directory is, for the releases only ("groupId/artifactId" directory only)- Returns:
- a String
 
- 
getVersionsVersions available of the artifact (both releases and snapshots) ("groupId/artifactId" directory only)- Returns:
- a List<String>
 
- 
getLastUpdatedWhen 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
 
- 
getSnapshotThe current snapshot data in use for this version ("groupId/artifactId/version" only)- Returns:
- a Snapshot
 
- 
getSnapshotVersionsInformation 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>
 
- 
withCreates a new builder with this object as the basis.- Returns:
- a Builder
 
- 
withLatestCreates a newVersioninginstance using the specified latest.- Parameters:
- latest- the new- Stringto use
- Returns:
- a Versioningwith the specified latest
 
- 
withReleaseCreates a newVersioninginstance using the specified release.- Parameters:
- release- the new- Stringto use
- Returns:
- a Versioningwith the specified release
 
- 
withVersionsCreates a newVersioninginstance using the specified versions.- Parameters:
- versions- the new- Collection<String>to use
- Returns:
- a Versioningwith the specified versions
 
- 
withLastUpdatedCreates a newVersioninginstance using the specified lastUpdated.- Parameters:
- lastUpdated- the new- Stringto use
- Returns:
- a Versioningwith the specified lastUpdated
 
- 
withSnapshotCreates a newVersioninginstance using the specified snapshot.- Parameters:
- snapshot- the new- Snapshotto use
- Returns:
- a Versioningwith the specified snapshot
 
- 
withSnapshotVersionsCreates a newVersioninginstance using the specified snapshotVersions.- Parameters:
- snapshotVersions- the new- Collection<SnapshotVersion>to use
- Returns:
- a Versioningwith the specified snapshotVersions
 
- 
newInstanceCreates a newVersioninginstance. Equivalent tonewInstance(true).- Returns:
- a new Versioning
- See Also:
 
- 
newInstanceCreates 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
 
- 
newBuilderCreates a newVersioningbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new Builder
- See Also:
 
- 
newBuilderCreates a newVersioningbuilder instance using default values or not.- Parameters:
- withDefaults- the boolean indicating whether default values should be used
- Returns:
- a new Builder
 
- 
newBuilderCreates a newVersioningbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
- from- the- Versioninginstance to use as a basis
- Returns:
- a new Builder
 
- 
newBuilderCreates a newVersioningbuilder instance using the specified object as a basis.- Parameters:
- from- the- Versioninginstance to use as a basis
- forceCopy- the boolean indicating if a copy should be forced
- Returns:
- a new Builder
 
 
-