brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] brooklyn-server issue #672: Bundle uninstall and snapshot
Date Thu, 15 Jun 2017 10:29:33 GMT
Github user neykov commented on the issue:
    I've been catching up on some of the merged PRs and noticed the following. When doing
`br catalog add .` with the following `` in the folder:
      bundle: org.apache.brooklyn.test
      version: "0.1.0-SNAPSHOT"
      itemType: entity
        type: org.apache.brooklyn.core.test.entity.TestEntity
    I get the error:
    Server error (400): invalid version "0.1.0-SNAPSHOT": non-numeric "0-SNAPSHOT": NumberFormatException:
For input string: "0-SNAPSHOT"
    In `` we are using maven style versioning and the OSGi style of versioning
differs from it, mostly by enforcing a `.`delimiter for the extra tags. It's not restricted
to `SNAPSHOT` versions (which is not a special version in OSGi). It applies to any tagged
    The code must take this into account and:
      * Convert maven style versions to osgi style versions when initializing the bundle metadata.
There's `OsgiUtils.toOsgiVersion(String)` to do the mapping which uses the same code as maven
does to do the conversion.
      * Keep the duality hidden to the internals. The version from `` should be
the one we see the catalog item created with, etc. 
      * For the case where there's no `` and we rely on the `MANIFEST.MF` - try
to get the maven version and use that for the user-visible parts. For example `Implementation-Version`
header  or ``. Fallback to the `Version` header when no alternative source is
      * The conversion is one way - we can't recover the maven version from an OSGi version.
This means we can't directly map from a bundle version to a catalog version without additional

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message