org.apache.maven.project.artifact
Class VersionExpressionTransformation

java.lang.Object
  extended byorg.codehaus.plexus.logging.AbstractLogEnabled
      extended byorg.apache.maven.project.interpolation.AbstractStringBasedModelInterpolator
          extended byorg.apache.maven.project.interpolation.StringSearchModelInterpolator
              extended byorg.apache.maven.project.artifact.VersionExpressionTransformation
All Implemented Interfaces:
ArtifactTransformation, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.logging.LogEnabled, ModelInterpolator

public class VersionExpressionTransformation
extends StringSearchModelInterpolator
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, ArtifactTransformation


Field Summary
 
Fields inherited from interface org.apache.maven.artifact.transform.ArtifactTransformation
ROLE
 
Fields inherited from interface org.apache.maven.project.interpolation.ModelInterpolator
BUILD_TIMESTAMP_FORMAT_PROPERTY, DEFAULT_BUILD_TIMESTAMP_FORMAT, ROLE
 
Constructor Summary
VersionExpressionTransformation()
           
 
Method Summary
protected  void interpolateVersions(File pomFile, File outputFile, Model model, File projectDir, ProjectBuilderConfiguration config)
           
 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, List remoteRepositories, ArtifactRepository localRepository)
          Take in a artifact and return the transformed artifact for locating in the remote repository.
protected  File transformVersions(File pomFile, Artifact artifact, ArtifactRepository localRepository)
           
 
Methods inherited from class org.apache.maven.project.interpolation.StringSearchModelInterpolator
createInterpolator, interpolate, interpolateObject
 
Methods inherited from class org.apache.maven.project.interpolation.AbstractStringBasedModelInterpolator
createPostProcessors, createValueSources, getInterpolator, getRecursionInterceptor, initialize, interpolate, interpolate, interpolate, interpolateInternal, setRecursionInterceptor
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
initialize
 

Constructor Detail

VersionExpressionTransformation

public VersionExpressionTransformation()
Method Detail

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.

Specified by:
transformForDeployment in interface ArtifactTransformation
Parameters:
artifact - Artifact to be transformed.
remoteRepository - the repository to deploy to
localRepository - the local repository
Throws:
ArtifactDeploymentException

transformForInstall

public void transformForInstall(Artifact artifact,
                                ArtifactRepository localRepository)
                         throws ArtifactInstallationException
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.

Specified by:
transformForInstall in interface ArtifactTransformation
Parameters:
artifact - Artifact to be transformed.
localRepository - the local repository it will be stored in
Throws:
ArtifactInstallationException

transformForResolve

public void transformForResolve(Artifact artifact,
                                List remoteRepositories,
                                ArtifactRepository localRepository)
                         throws ArtifactResolutionException,
                                ArtifactNotFoundException
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.

Specified by:
transformForResolve in interface ArtifactTransformation
Parameters:
artifact - Artifact to be transformed.
remoteRepositories - the repositories to check
localRepository - the local repository
Throws:
ArtifactResolutionException
ArtifactNotFoundException

transformVersions

protected File transformVersions(File pomFile,
                                 Artifact artifact,
                                 ArtifactRepository localRepository)
                          throws IOException,
                                 ModelInterpolationException
Throws:
IOException
ModelInterpolationException

interpolateVersions

protected void interpolateVersions(File pomFile,
                                   File outputFile,
                                   Model model,
                                   File projectDir,
                                   ProjectBuilderConfiguration config)
                            throws ModelInterpolationException
Throws:
ModelInterpolationException


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.