Class SnapshotTransformation
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.apache.maven.repository.legacy.resolver.transform.AbstractVersionTransformation
-
- org.apache.maven.repository.legacy.resolver.transform.SnapshotTransformation
-
- All Implemented Interfaces:
ArtifactTransformation,org.codehaus.plexus.logging.LogEnabled
@Component(role=ArtifactTransformation.class, hint="snapshot") public class SnapshotTransformation extends AbstractVersionTransformation
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.TimeZoneDEFAULT_SNAPSHOT_TIME_ZONEprivate static java.lang.StringDEFAULT_SNAPSHOT_TIMESTAMP_FORMATprivate java.lang.StringdeploymentTimestamp-
Fields inherited from class org.apache.maven.repository.legacy.resolver.transform.AbstractVersionTransformation
repositoryMetadataManager, wagonManager
-
Fields inherited from interface org.apache.maven.repository.legacy.resolver.transform.ArtifactTransformation
ROLE
-
-
Constructor Summary
Constructors Constructor Description SnapshotTransformation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringconstructVersion(Versioning versioning, java.lang.String baseVersion)java.lang.StringgetDeploymentTimestamp()static java.text.DateFormatgetUtcDateFormatter()private intresolveLatestSnapshotBuildNumber(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository remoteRepository)voidtransformForDeployment(Artifact artifact, ArtifactRepository remoteRepository, ArtifactRepository localRepository)Take in a artifact and return the transformed artifact for distributing to remote repository.voidtransformForInstall(Artifact artifact, ArtifactRepository localRepository)Take in a artifact and return the transformed artifact for locating in the local repository.voidtransformForResolve(Artifact artifact, RepositoryRequest request)Take in a artifact and return the transformed artifact for locating in the remote repository.-
Methods inherited from class org.apache.maven.repository.legacy.resolver.transform.AbstractVersionTransformation
resolveVersion, resolveVersion, transformForResolve
-
-
-
-
Field Detail
-
DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT
private static final java.lang.String DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT
- See Also:
- Constant Field Values
-
DEFAULT_SNAPSHOT_TIME_ZONE
private static final java.util.TimeZone DEFAULT_SNAPSHOT_TIME_ZONE
-
deploymentTimestamp
private java.lang.String deploymentTimestamp
-
-
Method Detail
-
transformForResolve
public void transformForResolve(Artifact artifact, RepositoryRequest request) throws ArtifactResolutionException
Description copied from interface:ArtifactTransformationTake in a artifact and return the transformed artifact for locating in the remote repository. If no transformation has occurred the original artifact is returned.- Parameters:
artifact- Artifact to be transformed.request- the repositories to check- Throws:
ArtifactResolutionException
-
transformForInstall
public void transformForInstall(Artifact artifact, ArtifactRepository localRepository)
Description copied from interface:ArtifactTransformationTake in a artifact and return the transformed artifact for locating in the local repository. If no transformation has occurred the original artifact is returned.- Parameters:
artifact- Artifact to be transformed.localRepository- the local repository it will be stored in
-
transformForDeployment
public void transformForDeployment(Artifact artifact, ArtifactRepository remoteRepository, ArtifactRepository localRepository) throws ArtifactDeploymentException
Description copied from interface:ArtifactTransformationTake in a artifact and return the transformed artifact for distributing to remote repository. If no transformation has occurred the original artifact is returned.- Parameters:
artifact- Artifact to be transformed.remoteRepository- the repository to deploy tolocalRepository- the local repository- Throws:
ArtifactDeploymentException
-
getDeploymentTimestamp
public java.lang.String getDeploymentTimestamp()
-
constructVersion
protected java.lang.String constructVersion(Versioning versioning, java.lang.String baseVersion)
- Specified by:
constructVersionin classAbstractVersionTransformation
-
resolveLatestSnapshotBuildNumber
private int resolveLatestSnapshotBuildNumber(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository remoteRepository) throws RepositoryMetadataResolutionException
-
getUtcDateFormatter
public static java.text.DateFormat getUtcDateFormatter()
-
-