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].incrementalVersionWhere the propertyPrefix is the string set in the mojo parameter.
- Since:
- 1.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.artifact.factory.ArtifactFactory
private org.apache.maven.artifact.metadata.ArtifactMetadataSource
The artifact metadata source to use.private org.apache.maven.artifact.repository.ArtifactRepository
private String
Prefix string to use for the set of version properties.private List<org.apache.maven.artifact.repository.ArtifactRepository>
Fields inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
project
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
defineVersionProperty
(String name, int value) private void
defineVersionProperty
(String name, String value) void
execute()
Methods inherited from class org.codehaus.mojo.buildhelper.AbstractDefinePropertyMojo
defineProperty, getProject
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
artifactMetadataSource
@Component private org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSourceThe 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 List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories -
propertyPrefix
Prefix string to use for the set of version properties.
-
-
Constructor Details
-
ReleasedVersionMojo
public ReleasedVersionMojo()
-
-
Method Details
-
defineVersionProperty
-
defineVersionProperty
-
execute
public void execute()
-