Package org.codehaus.mojo.buildhelper
Class ReleasedVersionMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
-
- org.codehaus.mojo.buildhelper.ReleasedVersionMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="released-version", defaultPhase=VALIDATE, threadSafe=true) public class ReleasedVersionMojo extends AbstractDefinePropertyMojo
Resolve the latest released version of this project. This mojo sets the following properties:[propertyPrefix].version [propertyPrefix].majorVersion [propertyPrefix].minorVersion [propertyPrefix].incrementalVersion
Where the propertyPrefix is the string set in the mojo parameter.- Since:
- 1.6
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.artifact.factory.ArtifactFactory
artifactFactory
private org.apache.maven.artifact.metadata.ArtifactMetadataSource
artifactMetadataSource
The artifact metadata source to use.private org.apache.maven.artifact.repository.ArtifactRepository
localRepository
private java.lang.String
propertyPrefix
Prefix string to use for the set of version properties.private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository>
remoteArtifactRepositories
-
Fields inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
project
-
-
Constructor Summary
Constructors Constructor Description ReleasedVersionMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
defineVersionProperty(java.lang.String name, int value)
private void
defineVersionProperty(java.lang.String name, java.lang.String value)
void
execute()
-
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
defineProperty, getProject
-
-
-
-
Field Detail
-
artifactMetadataSource
@Component private org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
The artifact metadata source to use.
-
artifactFactory
@Component private org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
-
localRepository
@Parameter(defaultValue="${localRepository}", readonly=true) private org.apache.maven.artifact.repository.ArtifactRepository localRepository
-
remoteArtifactRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true) private java.util.List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories
-
propertyPrefix
@Parameter(defaultValue="releasedVersion") private java.lang.String propertyPrefix
Prefix string to use for the set of version properties.
-
-