Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-98

Maven2OsgiConverter unnecessarily pads version numbers

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: maven-osgi
    • Labels:
      None

      Description

      In DefaultMavenOsgiConverter#getVersion(), there's logic to the effect of:

      /* convert

      • 1.string -> 1.0.0.string
      • 1.2.string -> 1.2.0.string
      • 1 -> 1.0.0
      • 1.1 -> 1.1.0
        */

      ...which is unnecessary; the version number only needs to be padded out to three places when there's a qualifier present.

      1. MSHARED-98-maven-osgi.patch
        4 kB
        Matthew Beermann
      2. MSHARED-98-maven-osgi.patch
        3 kB
        Matthew Beermann

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        2076d 5h 2m 1 Michael Osipov 25/Nov/14 14:47
        Mark Thomas made changes -
        Workflow jira [ 12963947 ] Default workflow, editable Closed status [ 13000321 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 01:15:59 UTC 2015 [ 1428282959282 ]
        Mark Thomas made changes -
        Workflow jira [ 12726103 ] Default workflow, editable Closed status [ 12764501 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:14:21 UTC 2015 [ 1428239661755 ]
        Michael Osipov made changes -
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        Michael Osipov added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Michael Osipov added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.
        Hide
        Guillaume Nodet added a comment -

        What I've fixed as part of FELIX-2173 is slightly different.
        The problem was that the osgi conversion used to convert '-' to '_' in the qualifier without any real need for that.
        The patch I used is available at
        http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java?p2=/felix/trunk/bundleplugin/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java&p1=/felix/trunk/bundleplugin/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java&r1=919426&r2=919425&view=diff&pathrev=919426

        I used the BND mechanism modified to honor the padding as it was the case previously.
        Removing the padding should be as simple as deleting three lines in the above patch.

        Show
        Guillaume Nodet added a comment - What I've fixed as part of FELIX-2173 is slightly different. The problem was that the osgi conversion used to convert '-' to '_' in the qualifier without any real need for that. The patch I used is available at http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java?p2=/felix/trunk/bundleplugin/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java&p1=/felix/trunk/bundleplugin/src/main/java/org/apache/maven/shared/osgi/DefaultMaven2OsgiConverter.java&r1=919426&r2=919425&view=diff&pathrev=919426 I used the BND mechanism modified to honor the padding as it was the case previously. Removing the padding should be as simple as deleting three lines in the above patch.
        Hide
        luke w patterson added a comment -

        saw something that might be related, throwing this out there so there's a trail:
        "Fix inconsistent maven->osgi version conversion between maven-bundle-plugin and DefaultMaven2OsgiConverter"
        https://issues.apache.org/jira/browse/FELIX-2173

        Show
        luke w patterson added a comment - saw something that might be related, throwing this out there so there's a trail: "Fix inconsistent maven->osgi version conversion between maven-bundle-plugin and DefaultMaven2OsgiConverter" https://issues.apache.org/jira/browse/FELIX-2173
        Matthew Beermann made changes -
        Attachment MSHARED-98-maven-osgi.patch [ 41348 ]
        Matthew Beermann made changes -
        Field Original Value New Value
        Attachment MSHARED-98-maven-osgi.patch [ 41344 ]
        Matthew Beermann created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Matthew Beermann
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development