public class VersionMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected String |
customVersionSuffix
Allows to append a custom (numeric) value to the current artifact's version,
i.e.
|
protected org.apache.maven.project.MavenProject |
project
[Read Only] The Maven project.
|
protected String |
snapshotSuffix
The snapshotSuffix used to identify and strip the -SNAPSHOT version suffix
See issue https://issues.alfresco.com/jira/browse/ENH-1232
|
protected boolean |
snapshotToTimestamp
Enable this option in order to replace -SNAPSHOT with the currentTimestamp
of the artifact creation
See issue https://issues.alfresco.com/jira/browse/ENH-1232
|
protected String |
version
[Read Only] Current version of the project
|
| Constructor and Description |
|---|
VersionMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
protected String |
getNormalizedVersion()
Normalizes the project's version following 2 patterns
- Remove the -SNAPSHOT suffix, if present
- (Optionally) append the timestamp to the version, if -SNAPSHOT is present
- (Optionally) append the build number to the version
|
protected String snapshotSuffix
protected boolean snapshotToTimestamp
protected String customVersionSuffix
protected org.apache.maven.project.MavenProject project
protected String version
protected String getNormalizedVersion()
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionCopyright © 2014. All rights reserved.