build-helper:parse-version
Full name:
org.codehaus.mojo:build-helper-maven-plugin:1.8:parse-version
Description:
Parse a version string and set properties containing the component
parts of the version. This mojo sets the following properties:
[propertyPrefix].majorVersion
[propertyPrefix].minorVersion
[propertyPrefix].incrementalVersion
[propertyPrefix].qualifier
[propertyPrefix].buildNumber
Where the propertyPrefix is the string set in the mojo parameter.
Note that the behaviour of the parsing is determined by
org.apache.maven.artifact.versioning.DefaultArtifactVersion An osgi
compatible version will also be created and made available through
the property:
[propertyPrefix].osgiVersion
This version is simply the original version string with the first
instance of '-' replaced by '.' For example, 1.0.2-beta-1 will be
converted to 1.0.2.beta-1
Attributes:
- Requires a Maven project to be executed.
- The goal is thread-safe and supports parallel builds.
- Since version: 1.3.
- Binds by default to the lifecycle phase: validate.
Optional Parameters
| Name |
Type |
Since |
Description |
| propertyPrefix |
String |
1.3 |
Prefix string to use for the set of version properties. Default value is: parsedVersion.
|
| versionString |
String |
1.3 |
The version string to parse. Default value is: ${project.version}.
|
Parameter Details
propertyPrefix:
Prefix string to use for the set of version properties.
- Type: java.lang.String
- Since: 1.3
- Required: No
- Default: parsedVersion
versionString:
The version string to parse.
- Type: java.lang.String
- Since: 1.3
- Required: No
- Default: ${project.version}