org.codehaus.mojo.properties
Class ParseVersionPropertiesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.properties.ParseVersionPropertiesMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public class ParseVersionPropertiesMojo
- extends org.apache.maven.plugin.AbstractMojo
Parse version number properties into [major].[minor].[incremental].[qualifier] and [trimmed]. The version parsing
logic is crudely simple. It splits the version string into tokens using both "." and "-" as delimiters. It assumes
the first token is "major", the second token is "minor" the third token is "incremental" and any tokens after that
are "qualifier". "SNAPSHOT" is always omitted from qualifier.
[trimmed] is the full version minus "-SNAPSHOT"
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAVEN_SNAPSHOT_TOKEN
public static final String MAVEN_SNAPSHOT_TOKEN
- See Also:
- Constant Field Values
ParseVersionPropertiesMojo
public ParseVersionPropertiesMojo()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
trimSnapshot
protected String trimSnapshot(String version)
setProjectProperty
protected void setProjectProperty(String key,
String suffix,
String value,
Properties props)
parseVersion
protected Version parseVersion(String s)
getQualifier
protected String getQualifier(String[] tokens)
getProperty
protected String getProperty(String key)
getProperties
public String[] getProperties()
setProperties
public void setProperties(String[] properties)
isSilent
public boolean isSilent()
setSilent
public void setSilent(boolean silent)
Copyright © 2009-2013 The Kuali Foundation. All Rights Reserved.