How to convert the third-party jar file to OSGI bundle using Eclipse Plugin project


URL to download the third party Jar file.
                        http://maven.ibiblio.org/maven2/junit/junit/4.4/

Pre-requisite :
                     - JRE 1.8 
                     - AEM instance up and running

Deployment of non-OSGI file to Felix console thoroughs below error.


HTTP ERROR: 500

Problem accessing /system/console/bundles. Reason:
    java.io.IOException: Bundle-SymbolicName header missing, cannot install bundle


Powered by Jetty://


Solution :



  • File-->new-->other-->Plug in Development-->plug in from existing JAR Archives-->Next






  • Next-->Add external Jar-->path to downloaded jar file in the above URL-->Next
  • Enter the Project name- TestJunit-->Finish


  • Righ click on TestJunit project-->configure-->convert to Maven project-->select the Project(TestJunit) -->Finish

  • Open the Menifest.mf file to check the additional headers added to the files
  • Select the TestJunit Project -->right click -->Run as -->Maven install

  • Observe the Build Success and TestJunit-0.0.1-SNAPSHOT.jar file under Target as shown in below screenshot
 
  • Now deploy the TestJunit-0.0.1-SNAPSHOT.jar file to felix consol.

1 comment: