Sunday, July 15, 2012

Plain EMF inside Apache Karaf OSGi Runtime

Since EMF bundles doesn't work out-of-the-box inside Karaf, and installing Eclipse libraries wreak havoc. I think it's better to simulate "plain EMF" inside OSGi.

Required patches are:

  1. org.eclipse.emf.common :
    remove Require-Bundle from MANIFEST.MF

    remove Bundle-Activator

  2. org.eclipse.emf.ecore:
    replace Require-Bundle with: Require-Bundle: org.eclipse.emf.common

    Import-Package: org.eclipse.emf.ecore,org.eclipse.emf.ecore.impl,org.e
    clipse.emf.ecore.plugin,org.eclipse.emf.ecore.resource,org.eclipse.em
    f.ecore.resource.impl,org.eclipse.emf.ecore.util,org.eclipse.emf.ecor
    e.xml.namespace,org.eclipse.emf.ecore.xml.namespace.impl,org.eclipse.
    emf.ecore.xml.namespace.util,org.eclipse.emf.ecore.xml.type,org.eclip
    se.emf.ecore.xml.type.impl,org.eclipse.emf.ecore.xml.type.internal,or
    g.eclipse.emf.ecore.xml.type.util,org.xml.sax,org.xml.sax.helpers,
    org.xml.sax.ext,org.w3c.dom,javax.xml.parsers,javax.xml.namespace,
    javax.xml.datatype

    remove Bundle-Activator

  3. org.eclipse.emf.ecore.xmi:
    replace Require-Bundle with: Require-Bundle: org.eclipse.emf.common,org.eclipse.emf.ecore

    Import-Package: org.eclipse.emf.ecore.xmi,org.eclipse.emf.ecore.xmi.im
    pl,org.eclipse.emf.ecore.xmi.util,org.xml.sax,org.xml.sax.helpers,
    org.xml.sax.ext,org.w3c.dom,javax.xml.parsers,javax.xml.namespaceremove Bundle-Activator

No comments:

Post a Comment