You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2007/06/13 18:27:26 UTC

[jira] Created: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Bundle plugin is incorrectly converting version numbers
-------------------------------------------------------

                 Key: FELIX-306
                 URL: https://issues.apache.org/jira/browse/FELIX-306
             Project: Felix
          Issue Type: Bug
          Components: Maven Bundle Plugin
            Reporter: Richard S. Hall
            Priority: Minor


The bundle plugin appears to be converting version numbers incorrectly. For example:

    0.9.0-incubator-SNAPSHOT

Is being converted to:

    0.9.0.incubator_SNAPSHOT

Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall closed FELIX-306.
---------------------------------


My bad, you are correct. I forgot that we change the trunk POMs to point to the released versions. I will close this issue.

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517439 ] 

Stuart McCulloch commented on FELIX-306:
----------------------------------------

This still appears to be an issue with the 1.0.0 release of the bundle-plugin.

If you delegate the version mangling to BND using:

    <Bundle-Version>${project.version}</Bundle-Version>

then it looks ok - perhaps the maven code could delegate to BND? (or look into how it does the mangling)

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-306:
-----------------------------------


Hi,

I'd like to get all resolved defects verified before releasing the 1.1.0 version of the bundleplugin - so I'd really appreciate it if you could check things are still ok with the current snapshot, and if so close off the defect.

Thanks in advance!

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Carlos Sanchez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504314 ] 

Carlos Sanchez commented on FELIX-306:
--------------------------------------

I'll look into it

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch reassigned FELIX-306:
--------------------------------------

    Assignee: Stuart McCulloch

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch resolved FELIX-306.
------------------------------------

    Resolution: Fixed

The BND library now does all the necessary version formatting, so to be
consistent wrt. bundle versions and import / export versions we should
just pass the maven versions onto BND.

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-306:
-----------------------------------


can this issue be closed?

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Carlos Sanchez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504450 ] 

Carlos Sanchez commented on FELIX-306:
--------------------------------------

can anyone look into testConvertVersionToOsgi and say if those assumptions are right ?

https://svn.apache.org/repos/asf/maven/sandbox/trunk/shared/maven-osgi/src/test/java/org/apache/maven/shared/osgi/Maven2OsgiConverterTest.java

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552250 ] 

Richard S. Hall commented on FELIX-306:
---------------------------------------

As far as I can see, it still suffers from this issue...if my POM contains:

  <version>1.1.0-incubator-SNAPSHOT</version>

The resulting manifest contains:

  Bundle-Version: 1.1.0.incubator_SNAPSHOT


> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504500 ] 

Stuart McCulloch commented on FELIX-306:
----------------------------------------

Yes - looks fine apart from the hyphen issue, as Felix mentioned.

FYI, Eclipse shows a warning when there are hyphens in Bundle-SymbolicName:

    "Bundle symbolic name contains illegal characters.  Legal characters are A-Z a-z 0-9 . _"

but I'm not sure if this is an OSGi restriction (this doesn't apply to Bundle-Name).

Recent versions of the BND tool also support conversion of versions to OSGi standards.
This even applies to any automatically discovered versions of import / export packages.

Here are the tests used with BND:

               assertVersion("1.2.3.x",         "1.2.3.x");
               assertVersion("1.2.3",           "1.2.3");
               assertVersion("1.2",             "1.2");
               assertVersion("1",               "1");
               assertVersion("1.2.x",           "1.2.0.x");
               assertVersion("1.x",             "1.0.0.x");
               assertVersion("1.2.3-x",         "1.2.3.x");
               assertVersion("1.2:x",           "1.2.0.x");
               assertVersion("1.2-snapshot",    "1.2.0.snapshot");
               assertVersion("1#x",             "1.0.0.x");
               assertVersion("1.&^%$#date2007/03/04", "1.0.0.date20070304");


> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on FELIX-306 started by Stuart McCulloch.

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552316 ] 

Stuart McCulloch commented on FELIX-306:
----------------------------------------

hmm, are you sure you're using the 1.1.0-SNAPSHOT? because with the following test POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <modelVersion>4.0.0</modelVersion>
  <groupId>examples</groupId>
  <artifactId>version.test</artifactId>
  <version>1.1.0-incubator-SNAPSHOT</version>

  <packaging>bundle</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>1.1.0-SNAPSHOT</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Private-Package>*</Private-Package>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <pluginRepositories>
    <pluginRepository>
      <id>ops4j-snapshots</id>
      <url>http://repository.ops4j.org/mvn-snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>asm</groupId>
      <artifactId>asm</artifactId>
      <version>2.2.3</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>

</project>

I get the following manifest:

Manifest-Version: 1.0

Created-By: 1.4.2_15 (Sun Microsystems Inc.)

Bnd-LastModified: 1197860624509

Bundle-Version: 1.1.0.incubator-SNAPSHOT

Bundle-Name: Unnamed - examples:version.test:bundle:1.1.0-incubator-SN
APSHOT

Private-Package: org.objectweb.asm,org.objectweb.asm.signature

Ant-Version: Apache Ant 1.6.5

Originally-Created-By: 1.5.0_07-b03 (Sun Microsystems Inc.)

Bundle-ManifestVersion: 2

Bundle-SymbolicName: examples.version.test

Implementation-Title: ASM

Tool: Bnd-0.0.213

Implementation-Version: 2.2.3

Implementation-Vendor: France Telecom R&D



where the version appears correct: 1.1.0.incubator-SNAPSHOT

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Assignee: Stuart McCulloch
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-306) Bundle plugin is incorrectly converting version numbers

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504488 ] 

Felix Meschberger commented on FELIX-306:
-----------------------------------------

I would say so, except for the last entries which convert the hyphen (-) into underscores (_), too. Hyphens are allowed in the qualifier and should therefore probably not be mapped.

> Bundle plugin is incorrectly converting version numbers
> -------------------------------------------------------
>
>                 Key: FELIX-306
>                 URL: https://issues.apache.org/jira/browse/FELIX-306
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>            Reporter: Richard S. Hall
>            Priority: Minor
>
> The bundle plugin appears to be converting version numbers incorrectly. For example:
>     0.9.0-incubator-SNAPSHOT
> Is being converted to:
>     0.9.0.incubator_SNAPSHOT
> Only the first '-' should be converted to a '.' to be compatible with OSGi, the remaining '-' characters to not need to be converted.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.