Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-301

As a user, I want bundlor in STS to work without a pre-existing MANIFEST.MF

    Details

      Description

      I am using Bundlor via Maven and via Eclipse. There is an issue I discovered between the two approaches to generate the MANIFEST.MF. The Maven plugin either manipulates the packaged artifact directly (via transform) or creates in the configured output folder (via manifest). Thus you always have an up to date MANIFEST.MF in your resulting artifact and don't need to check a MANIFEST.MF into the VCS of choice.

      The Bundlor Eclipseplugin relies on the existence of a MANIFEST.MF in one of the source folders (as it probably can not be sure where to put a newly created one?). So I have to create a MANIFEST.MF file myself and put it into let's say src/main/resources. If I want my college to be able to work with the project out of the box I have to check this file into the VCS, which is rather suboptimal as - that is bigger issue IMHO - you have a MANIFEST.MF in the project sources that might differ the one that ends up in the artifact (if you build with Maven).

        Activity

        Hide
        jsbornival JS Bournival added a comment -

        I'm using M2Eclipse, and created a bundle based on the spring-osgi-bundle-artifact 1.2.0.

        in the project's META-INF dir, there's a readme.txt saying:

        ---------%<-------------
        To facilitate OSGi bundle manifest generation, the archetype offers the choice of two maven plugins.

        a. SpringSource Bundlor Plugin
        Home page: http://www.springsource.org/bundlor

        "SpringSource(tm) Bundlor is a tool that automates the detection of dependencies and the creation of OSGi
        manifest directives for JARs after their creation."

        The Bundlor tool is enabled by default.

        b. Apache Felix Bundle Plugin
        Home page: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html

        "This plugin for Maven 2 is based on the BND tool from Peter Kriens. [...] The way you create a bundle
        with BND is to tell it the content of the bundle's JAR file as a subset of the available classes."

        To trigger the manifest generation (using either plugin), run: mvn package
        ---------%<-------------

        Alas, when using the Bundlor option, the Manifest doesn't gets generated in the META-INF directory when issuing a "mvn package" command.

        P.S. Now that Eclipse complains. Any workaround besides turning off the Eclipse validator?

        Show
        jsbornival JS Bournival added a comment - I'm using M2Eclipse, and created a bundle based on the spring-osgi-bundle-artifact 1.2.0. in the project's META-INF dir, there's a readme.txt saying: --------- %< ------------- To facilitate OSGi bundle manifest generation, the archetype offers the choice of two maven plugins. a. SpringSource Bundlor Plugin Home page: http://www.springsource.org/bundlor "SpringSource(tm) Bundlor is a tool that automates the detection of dependencies and the creation of OSGi manifest directives for JARs after their creation." The Bundlor tool is enabled by default. b. Apache Felix Bundle Plugin Home page: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html "This plugin for Maven 2 is based on the BND tool from Peter Kriens. [...] The way you create a bundle with BND is to tell it the content of the bundle's JAR file as a subset of the available classes." To trigger the manifest generation (using either plugin), run: mvn package --------- %< ------------- Alas, when using the Bundlor option, the Manifest doesn't gets generated in the META-INF directory when issuing a "mvn package" command. P.S. Now that Eclipse complains. Any workaround besides turning off the Eclipse validator?
        Hide
        frederic.conrotte Frederic Conrotte added a comment -

        I may be wrong but I don't think SpringSource will support Eclipse PDE to develop Spring DM bundles with Spring STS. Otherwise it would be too easy to deploy to Equinox instead of Spring DM Server.

        Check the Spring DM server Greenpages sample in "getting started.pdf" user guide => There is no /META-INF/MANIFEST.MF folder, resources are only stored in src/main/resources so it's not compatible with Eclipse Plugins.

        Show
        frederic.conrotte Frederic Conrotte added a comment - I may be wrong but I don't think SpringSource will support Eclipse PDE to develop Spring DM bundles with Spring STS. Otherwise it would be too easy to deploy to Equinox instead of Spring DM Server. Check the Spring DM server Greenpages sample in "getting started.pdf" user guide => There is no /META-INF/MANIFEST.MF folder, resources are only stored in src/main/resources so it's not compatible with Eclipse Plugins.
        Hide
        ogierke Oliver Gierke added a comment -

        Are you sure you commented the right issue? There's nothing about the project type I mentioned. I just wanted to state that working with the Bundlor Eclipse plugin somewhat conflicts with using it in Maven.

        Show
        ogierke Oliver Gierke added a comment - Are you sure you commented the right issue? There's nothing about the project type I mentioned. I just wanted to state that working with the Bundlor Eclipse plugin somewhat conflicts with using it in Maven.
        Hide
        rklaren Ric Klaren added a comment -
        • Same for the TEST.MF
        • and the option to not look at the existing manifest (e.g. overwrite not merge (particularly annoying when converting many bundles to bundlor))
        • warnings for multiple Manifests in 'valid' places
        Show
        rklaren Ric Klaren added a comment - Same for the TEST.MF and the option to not look at the existing manifest (e.g. overwrite not merge (particularly annoying when converting many bundles to bundlor)) warnings for multiple Manifests in 'valid' places

          People

          • Assignee:
            Unassigned
            Reporter:
            ogierke Oliver Gierke
          • Votes:
            3 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5d
              0.5d
              Remaining:
              0d
              Logged:
              Time Not Required
              1m