Maven2OsgiConverter provide simple mechanism for more than 3 version part
conversion
------------------------------------------------------------------------------------
Key: MSHARED-210
URL: https://jira.codehaus.org/browse/MSHARED-210
Project: Maven Shared Components
Issue Type: New Feature
Reporter: Darryl L. Miles
At the moment the default Maven2OsgiConverter implementation truncates the
version number after the 3rd part.
1.2.3.4.5.20111019-SNAPSHOT => 1.2.3.SNAPSHOT
This request is to provide a mechanism to allow a fully numeric part to be
padded with leading zeros like:
1.2.3.4.5.20111019-SNAPSHOT => 1.2.00300400520111019.SNAPSHOT
1.2.20111019-SNAPSHOT => 1.2.20111019.SNAPSHOT
1.2.3.20111019-SNAPSHOT => 1.2.00320111019.SNAPSHOT
The only option the user needs to supply in configuration is the number of
places to pad it out to, if the part is already that long (or longer) then no
extra padding is added. Maybe the default is 3 (or an automatic default of).
I think this kind of conversion should be an option built into the stock
Maven/OSGi integration, you are converting a valid Maven version number into a
valid OSGi version number and providing a mechanism to loose the least amount
of precision of information.
A really nice to have feature would be an option to specify a formatter
%{03:1}.%{2}.%{06:3} where all padding presumes leading zeros (never spaces),
where is uses some other Java convention for String formatting, where the
output must have no more than 3 full-stop characters in it (and other
validation fules). So a sub-set of String formatter rules but allowing total
control. Any parts not conforming to the rules would cause plugin build
failure and suitable conversion error.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira