Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-941

Support singleton & fragment-attachment directive generation

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: maven-bundle-plugin-2.0.0
    • Fix Version/s: maven-bundle-plugin-2.0.0
    • Component/s: Maven Bundle Plugin
    • Labels:
      None
    • Environment:
      generic

      Description

      It will be good to have some way to configure mvn-bundle-plugin to generate singleton and fragment-attachment directives in Bundle-SymbolicName header.

        Activity

        Hide
        mcculls Stuart McCulloch added a comment -

        Closing as maven-bundle-plugin 2.0.0 has been released.

        Show
        mcculls Stuart McCulloch added a comment - Closing as maven-bundle-plugin 2.0.0 has been released.
        Hide
        mcculls Stuart McCulloch added a comment -

        OK, we now store the generated default symbolicname in a property called "maven-symbolicname".

        To use this property in your POM instructions you'll need to use brackets '()' instead of braces '{}' to
        stop Maven from replacing it with null (ie. undefined) before the XML text reaches the bundleplugin:

        <Bundle-SymbolicName>$(maven-symbolicname);singleton:=true</Bundle-SymbolicName>

        But if you put it in a separate file (ie.not directly in the POM) you can use $

        {maven-symbolicname}
        Show
        mcculls Stuart McCulloch added a comment - OK, we now store the generated default symbolicname in a property called "maven-symbolicname". To use this property in your POM instructions you'll need to use brackets '()' instead of braces '{}' to stop Maven from replacing it with null (ie. undefined) before the XML text reaches the bundleplugin: <Bundle-SymbolicName>$(maven-symbolicname);singleton:=true</Bundle-SymbolicName> But if you put it in a separate file (ie.not directly in the POM) you can use $ {maven-symbolicname}
        Hide
        sahoo Sahoo added a comment -

        Although I can do what you suggested, I would prefer an alternative way that avoids me to specify Bundle-SymbolicName. I let maven-bundle-plugin come up with the Bundle-SymbolicName using a standard algorithm for all my bundles and that results in a consistent behavior. If I hard code the name or the logic in my pom.xml, it may lead to an inconsistent result.

        Show
        sahoo Sahoo added a comment - Although I can do what you suggested, I would prefer an alternative way that avoids me to specify Bundle-SymbolicName. I let maven-bundle-plugin come up with the Bundle-SymbolicName using a standard algorithm for all my bundles and that results in a consistent behavior. If I hard code the name or the logic in my pom.xml, it may lead to an inconsistent result.
        Hide
        mcculls Stuart McCulloch added a comment -

        you can already do:

        <Bundle-SymbolicName>org.foo.example;singleton=true</Bundle-SymbolicName>

        or were you thinking of configuring this another way?

        Show
        mcculls Stuart McCulloch added a comment - you can already do: <Bundle-SymbolicName>org.foo.example;singleton=true</Bundle-SymbolicName> or were you thinking of configuring this another way?

          People

          • Assignee:
            mcculls Stuart McCulloch
            Reporter:
            sahoo Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development