Menu

#6 Make Jackson Import-Package Optional in Bundle Manifest

future
closed
None
2014-09-05
2014-08-14
No

Could you make the Import-Package statement for Jackson optional in the bundle? That way Jackson doesn't need to be deployed and the biweekly bundle can still be started. You mention in https://sourceforge.net/p/biweekly/wiki/Maven/ that Jackson is optional. I tried the bundle in version 0.3.4 and that still requires Jackson.

Discussion

  • Michael Angstadt

    Thanks for the report. I am not that familiar with bundles. :( Do you know how to do this? It would probably require a change to the Maven Bundle plugin's configuration:

    :::xml
    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <configuration>
            <instructions>
                <Include-Resource>{maven-resources}, {biweekly.properties=target/classes/biweekly.properties}</Include-Resource>
            </instructions>
        </configuration>
    </plugin>
    
     
  • Konrad Windszus

    Konrad Windszus - 2014-08-18

    The following should work fine

    <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <configuration>
            <instructions>
                <Import-Package>
                    com.fasterxml.jackson.*;resolution:=optional,
                    *
                </Import-Package>
            </instructions>
        </configuration>
    </plugin
    
     
  • Michael Angstadt

    Thanks. Can you test the attached JAR?

     
  • Konrad Windszus

    Konrad Windszus - 2014-09-03

    Sorry for the delay. I just tested the updated bundle and it works fine without jackson.

     
  • Michael Angstadt

    No problem, Konrad. Thank you for testing it! I am not familiar with OSGi, and that trailing asterisk character looked fishy to me. :)

     
  • Michael Angstadt

    POM updated. Change will be included in the next release.

     
  • Michael Angstadt

    • status: open --> closed
    • assigned_to: Michael Angstadt
    • Milestone: 0.3.0 --> future
     

Log in to post a comment.