Results 1 to 3 of 3

Thread: STS not aware of maven-bundle-plugin generated manifest?

  1. #1
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    97

    Default STS not aware of maven-bundle-plugin generated manifest?

    Hi all.

    I have a maven project which uses the felix bnd plugin to generate my osgi manifest. When I try and deploy this project into DM Server from STS, the project's metadata seem to be ignored. For example, the version is always 0.0.0.

    From STS, the startup log shows:
    Code:
    [2009-08-13 11:13:48.413]  Connection(2)-127.0.0.1 <DE0059I> Starting bundle 'hello.spi.jar' version '0.0.0'. 
    [2009-08-13 11:13:48.734] server-dm-1              <DE0060I> Started bundle 'hello.spi.jar' version '0.0.0'.
    which is incorrect, but if I manually copy the jar to the pickup directory, I see

    Code:
    [2009-08-13 11:09:32.637] fs-watcher               <DE0056I> Installing bundle 'osgi.hello.spi' version '1.0.0.SNAPSHOT'. 
    [2009-08-13 11:09:32.724] fs-watcher               <DE0057I> Installed bundle 'osgi.hello.spi' version '1.0.0.SNAPSHOT'. 
    [2009-08-13 11:09:32.841] fs-watcher               <DE0059I> Starting bundle 'osgi.hello.spi' version '1.0.0.SNAPSHOT'. 
    [2009-08-13 11:09:33.061] server-dm-13             <DE0060I> Started bundle 'osgi.hello.spi' version '1.0.0.SNAPSHOT'.
    Which is correct.

    Is this a bug, or have I misconfigured something?

    I'm using DM Server 2.0.0.M4, and STS from a few days ago.

  2. #2
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    tunaranch,

    where does the maven bnd plugin put the generated MANIFEST.MF? Is that in a source or bin folder of your eclipse project?

    STS copies the contents of all project output folders to the "stage" directory of your dm Server installation. You can also check if there is a MANIFEST in it.

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  3. #3
    Join Date
    May 2007
    Location
    Brisbane, Australia
    Posts
    97

    Default

    Aha, that's what it was. The default instructions for bundles don't generate the manifest until the package phase, which doesn't happen when you're using m2eclipse.

    The workaround, then, is to force the bnd plugin to generate a plugin:
    Code:
    <executions>
      <execution>
        <id>bundle-manifest</id>
        <phase>process-classes</phase>
        <goals>
          <goal>manifest</goal>
        </goals>
      </execution>
    </executions>
    Thanks for your help in figuring this out.
    Last edited by tunaranch; Aug 16th, 2009 at 06:49 PM. Reason: s/\t/ /g

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •