[
https://jira.codehaus.org/browse/MBUILDHELPER-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273881#comment-273881
]
dev danke commented on MBUILDHELPER-33:
---------------------------------------
After further experimenting, I found my initial problem description was partly
incorrect and not complete. If I use non-zero digits in my version, such as
77, then the parse-version goal correctly returns majorVersion of 77.
However if my version format is 006, then the majorVersion returned is 0.
You may ask why I left pad my version with zeros. If I don't, then when the
file system sorts release in my Maven repository, they'll be out of order.
Without zero padding, release are sorted like this:
1
10
11
2
...
But I want:
1
2
3
...
10
11
Therefore, I must use left zero padding to get this:
01
02
...
10
11
> Enable parse-version goal to extract multi-digit version component
> ------------------------------------------------------------------
>
> Key: MBUILDHELPER-33
> URL: https://jira.codehaus.org/browse/MBUILDHELPER-33
> Project: Maven 2.x Build Helper Plugin
> Issue Type: Improvement
> Affects Versions: 1.7
> Reporter: dev danke
> Priority: Minor
>
> Although the most popular version format is major.minor.incremental, there
> are other widely used version formats. For instance, Google App Engine and
> Android projects use a simple integer, e.g. 1, 77, and 888. In these cases,
> you'd like ${parsedVersion.majorVersion} to return that entire value, either
> 1, 77, or 888. However, currently only the first digit from each version
> component is returned,
> Please enhance the parse-version goal to return all the digits in each
> component of ${project.version}.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email