Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-546

Import-Package version inconsistencies.

    Details

      Description

      There is an inconsistency in how versions are handled in Import-Package statements.

      Style 1: <Import-Package>com.ea.bugtest1;version=1.0.0-SNAPSHOT</Import-Package>

      ...produces...

      Import-Package: com.ea.bugtest1;version="1.0.0.SNAPSHOT"

      Style 2: <Import-Package>com.ea.bugtest1;version="1.0.0-SNAPSHOT"</Import-Package>

      ...produces...

      Import-Package: com.ea.bugtest1;version="1.0.0.SNAPSHOT"

      Style 3: <Import-Package>com.ea.bugtest1;version="[1.0.0-SNAPSHOT,1.0.0-SNAPSHOT]"</Import-Package>

      ...produces...

      Import-Package: com.ea.bugtest1;version="[1.0.0-SNAPSHOT,1.0.0-SNAPSHOT]"

      Note that the 1.0.0-SNAPSHOT has not been converted to 1.0.0.SNAPSHOT. Also, this form breaks the OBR pieces of the plugin. The OBR repository must be set to NONE for this to work at all. I'll file a separate bug on this issue

      I realize that having 1.0.0-SNAPSHOT in the import statment isn't exactly ideal, but it is coming in through a maven property. We're trying to find a way to maintain some consistency between our declared maven dependencies and our import-package statements by sharing a single property value.

      I will attach a small demo project that will allow you to easily demonstrate the issue.

      1. bugtest.tar.gz
        2 kB
        Thomas Dewire

        Activity

        Hide
        tomdewire Thomas Dewire added a comment -

        The issue may be seen in the bugtest2 project. Please read the comments in the pom. By commenting/un-commenting the various instructions, you can see the issues described in the bug report.

        Show
        tomdewire Thomas Dewire added a comment - The issue may be seen in the bugtest2 project. Please read the comments in the pom. By commenting/un-commenting the various instructions, you can see the issues described in the bug report.
        Hide
        mcculls Stuart McCulloch added a comment -

        This just missed the 1.4.1 release and will require a fix to the Bnd library, as it currently doesn't support cleanup of non-OSGi format versions inside ranges (I'll need to contact PeterK to get this fixed)

        Show
        mcculls Stuart McCulloch added a comment - This just missed the 1.4.1 release and will require a fix to the Bnd library, as it currently doesn't support cleanup of non-OSGi format versions inside ranges (I'll need to contact PeterK to get this fixed)
        Hide
        mcculls Stuart McCulloch added a comment -

        Quick update - I haven't had time to progress these issues because I've been working at a customer site - but I hope to devote some cycles when I'm back in Malaysia next week. If any of these need fixing urgently feel free to keep bugging me until they're fixed

        Show
        mcculls Stuart McCulloch added a comment - Quick update - I haven't had time to progress these issues because I've been working at a customer site - but I hope to devote some cycles when I'm back in Malaysia next week. If any of these need fixing urgently feel free to keep bugging me until they're fixed
        Hide
        mcculls Stuart McCulloch added a comment -

        This fix will require a change to the BND library, so moving it to target release 1.4.3 of the bundleplugin

        Show
        mcculls Stuart McCulloch added a comment - This fix will require a change to the BND library, so moving it to target release 1.4.3 of the bundleplugin
        Hide
        mcculls Stuart McCulloch added a comment -

        Ran bugtest2 against trunk and it now works as expected, will deploy a new 1.5.0-SNAPSHOT for testing tomorrow morning (8hrs from now).

        For anyone else running this test, note there is a small typo in the third example:

        "[$

        {bugtest1.version},${bugtest1..version}]"

        should be:

        "[${bugtest1.version}

        ,$

        {bugtest1.version}

        ]"

        Show
        mcculls Stuart McCulloch added a comment - Ran bugtest2 against trunk and it now works as expected, will deploy a new 1.5.0-SNAPSHOT for testing tomorrow morning (8hrs from now). For anyone else running this test, note there is a small typo in the third example: "[$ {bugtest1.version},${bugtest1..version}]" should be: "[${bugtest1.version} ,$ {bugtest1.version} ]"
        Hide
        mcculls Stuart McCulloch added a comment -

        Closing as maven-bundle-plugin 2.0.0 has been released.

        Show
        mcculls Stuart McCulloch added a comment - Closing as maven-bundle-plugin 2.0.0 has been released.

          People

          • Assignee:
            mcculls Stuart McCulloch
            Reporter:
            tomdewire Thomas Dewire
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development