You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2012/01/24 12:00:06 UTC

[jira] (MSHARED-210) Maven2OsgiConverter provide simple mechanism for more than 3 version part conversion

     [ https://jira.codehaus.org/browse/MSHARED-210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated MSHARED-210:
---------------------------------------

    Component/s: maven-osgi
    
> 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
>          Components: maven-osgi
>            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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira