Class SnapshotTransformation
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.apache.maven.artifact.transform.AbstractVersionTransformation
-
- org.apache.maven.artifact.transform.SnapshotTransformation
-
- All Implemented Interfaces:
ArtifactTransformation
,org.codehaus.plexus.logging.LogEnabled
public class SnapshotTransformation extends AbstractVersionTransformation
- Version:
- $Id: SnapshotTransformation.java,v 1.1 2005/03/03 15:37:25 jvanzyl Exp $
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
deploymentTimestamp
private static java.util.TimeZone
UTC_TIME_ZONE
private static java.lang.String
UTC_TIMESTAMP_PATTERN
-
Fields inherited from class org.apache.maven.artifact.transform.AbstractVersionTransformation
repositoryMetadataManager, wagonManager
-
Fields inherited from interface org.apache.maven.artifact.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.String
constructVersion(org.apache.maven.artifact.repository.metadata.Versioning versioning, java.lang.String baseVersion)
java.lang.String
getDeploymentTimestamp()
static java.text.DateFormat
getUtcDateFormatter()
private int
resolveLatestSnapshotBuildNumber(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository remoteRepository)
void
transformForDeployment(Artifact artifact, ArtifactRepository remoteRepository, ArtifactRepository localRepository)
Take in a artifact and return the transformed artifact for distributing toa remote repository.void
transformForInstall(Artifact artifact, ArtifactRepository localRepository)
Take in a artifact and return the transformed artifact for locating in the local repository.void
transformForResolve(Artifact artifact, java.util.List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository)
Take in a artifact and return the transformed artifact for locating in the remote repository.-
Methods inherited from class org.apache.maven.artifact.transform.AbstractVersionTransformation
resolveVersion
-
-
-
-
Field Detail
-
deploymentTimestamp
private java.lang.String deploymentTimestamp
-
UTC_TIME_ZONE
private static final java.util.TimeZone UTC_TIME_ZONE
-
UTC_TIMESTAMP_PATTERN
private static final java.lang.String UTC_TIMESTAMP_PATTERN
- See Also:
- Constant Field Values
-
-
Method Detail
-
transformForResolve
public void transformForResolve(Artifact artifact, java.util.List<ArtifactRepository> remoteRepositories, ArtifactRepository localRepository) throws ArtifactResolutionException
Description copied from interface:ArtifactTransformation
Take in a artifact and return the transformed artifact for locating in the remote repository. If no transformation has occured the original artifact is returned.- Parameters:
artifact
- Artifact to be transformed.remoteRepositories
- the repositories to checklocalRepository
- the local repository- Throws:
ArtifactResolutionException
-
transformForInstall
public void transformForInstall(Artifact artifact, ArtifactRepository localRepository)
Description copied from interface:ArtifactTransformation
Take in a artifact and return the transformed artifact for locating in the local repository. If no transformation has occured 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:ArtifactTransformation
Take in a artifact and return the transformed artifact for distributing toa remote repository. If no transformation has occured 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(org.apache.maven.artifact.repository.metadata.Versioning versioning, java.lang.String baseVersion)
- Specified by:
constructVersion
in classAbstractVersionTransformation
-
resolveLatestSnapshotBuildNumber
private int resolveLatestSnapshotBuildNumber(Artifact artifact, ArtifactRepository localRepository, ArtifactRepository remoteRepository) throws RepositoryMetadataResolutionException
-
getUtcDateFormatter
public static java.text.DateFormat getUtcDateFormatter()
-
-