Announcement Announcement Module
No announcement yet.
Spring Maven Archetype using Bundlor Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Maven Archetype using Bundlor

    I think I found a little problem in the spring osgi maven archetype. It concerns the Bundle-Version header.

    When generating my project via M2Eclipse, maven created a pom file with bundlor as the Manifest file "manager" with some preset directives, namely:

    <manifestHeaders><![CDATA[Bundle-ManifestVersion: 2
    Bundle-Name: article-rest
    Bundle-Version: 0.0.1-SNAPSHOT
    Bundle-SymbolicName: article-rest
    Spring-DM-Version: ${spring.osgi.version}

    It appears that when installing this bundle in my local repository, and then loading it in my servicemix4 server, I get this exception:

    servicemix osgi> install -s
    java.lang.NumberFormatException: For input string: "1-SNAPSHOT"
    at java.lang.NumberFormatException.forInputString(Num
    at java.lang.Integer.parseInt(
    at java.lang.Integer.parseInt(
    at org.osgi.framework.Version.<init>( )
    %< snip

    I fixed it by setting the Bundle-version header to:
    0.0.1.SNAPSHOT instead of 0.0.1-SNAPSHOT

    Now it works.

  • #2
    Exception with -SNAPSHOT manifest versions, but not with .SNAPSHOT

    Hi all,

    I would like to suggest to the developers of the com.springsource.bundlor.maven mojo to strip the -SNAPSHOT when it shows in a manifest template or configuration. I suppose that other maven plugins like "release" may not work properly with the .SNAPSHOT suffix.



    • #3
      You may be interested in BNDLR-245 which concerns this problem.

      Alternatively, you can specify an OSGi-compatiable version in your pom file, e.g. <version>1.0.0.SNAPSHOT</version>, which will then be used by Bundlor to set the value of the Bundle-Version header.