Menu

#15 Deploy flexjson as an OSGi friendly .jar file

open
nobody
None
5
2013-08-14
2010-11-10
Anonymous
No

Modify the flexjson packaging to add the appropriate lines in the MANIFEST.MF file so it can be deployed as an OSGi bundle.

Discussion

  • Roland Weiglhofer

    This should be done quickly. It is easy to implement. Just use the maven-bundle-plugin.

     
  • Brandon Goodin

    Brandon Goodin - 2013-08-13

    Hey Roland. Thanks for the feedback. I'm aware of OSGi. But, I have never had to implement a system with it. So, I do not understand the requirements here. If it is easy to implement then it would be most appreciated if you could provide a patch on what we need to do. I currently have no need for this feature and do not possess the knowledge to implement this quickly. Unfortunately that means I am not going to implement it unless someone in the FlexJSON community provides a patch.

     
  • Roland Weiglhofer

    Hi Brandon,
    A requirement did/does not exist in most cases because many bundle repositories (eg Sonatype Nexus) automatically convert libraries to bundles. But there exist some repositories without this functionality and then this has to be done by hand.

    ok...If I'll have time someday I'll create a patch for you.

     
  • Roland Weiglhofer

    Hello Brandon,
    yes it is!
    Thx!!

     

    Last edit: Roland Weiglhofer 2013-08-14
  • Brandon Goodin

    Brandon Goodin - 2013-08-14

    I ran the build locally and the MANIFEST.MF now contains the following. If this looks correct I'll go ahead and commit the changes to SVN.

    Manifest-Version: 1.0
    Archiver-Version: Plexus Archiver
    Created-By: Apache Maven Bundle Plugin
    Built-By: brandongoodin
    Build-Jdk: 1.6.0_51
    Bnd-LastModified: 1376478986778
    Bundle-Description: Sonatype helps open source projects to set up Mave
    n repositories on https://oss.sonatype.org/
    Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
    Bundle-ManifestVersion: 2
    Bundle-Name: flexjson
    Bundle-SymbolicName: net.sf.flexjson
    Bundle-Version: 3.2.0.SNAPSHOT
    Export-Package: flexjson;uses:="flexjson.transformer";version="3.2.0.S
    NAPSHOT",flexjson.factories;uses:=flexjson;version="3.2.0.SNAPSHOT",f
    lexjson.locators;uses:=flexjson;version="3.2.0.SNAPSHOT",flexjson.tra
    nsformer;uses:=flexjson;version="3.2.0.SNAPSHOT"
    Tool: Bnd-2.1.0.20130426-122213

     
  • Roland Weiglhofer

    Oh no sorry. You miss something. You have to export the packages.

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        ...
        <configuration>
          <instructions>
            <Export-Package>flexjson</Export-Package>
    
     
  • Roland Weiglhofer

    ok ... thats correct I think! I see no errors in the manifest.

     
  • Roland Weiglhofer

    Thx

     
  • Brandon Goodin

    Brandon Goodin - 2013-08-14

    Committed it to trunk. I'll see what I can do about getting a SNAPSHOT build out at some point.

     
  • Roland Weiglhofer

    ok. thx.

     
  • Roland Weiglhofer

    Hi,
    I installed it and everything seems to be ok.


    output

    g! inspect cap * 51
    net.sf.flexjson [51] provides:


    osgi.wiring.bundle; net.sf.flexjson 3.2.0.SNAPSHOT [UNUSED]
    osgi.wiring.host; net.sf.flexjson 3.2.0.SNAPSHOT [UNUSED]
    osgi.wiring.package; flexjson 3.2.0.SNAPSHOT [UNUSED]
    osgi.wiring.package; flexjson.factories 3.2.0.SNAPSHOT [UNUSED]
    osgi.wiring.package; flexjson.locators 3.2.0.SNAPSHOT [UNUSED]
    osgi.wiring.package; flexjson.transformer 3.2.0.SNAPSHOT [UNUSED]

    Thanks!
    Roland

     

Log in to post a comment.