Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF dependencies in plain OSGi application
EMF dependencies in plain OSGi application [message #902002] Wed, 15 August 2012 12:58 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

we want to use EMF in a plain OSGi application, where even equinox might
be replaced by some other OSGi kernel (e.g. felix).

By "use" I mean that we want to use the generated classes and saving and
loading of resources.

I understand the main requirements for EMF are
* org.eclipse.emf.ecore
* org.eclipse.emf.common
* org.eclipse.emf.ecore.xmi if you want XMI support

In a plain Java application it is sufficient to put those jar files into
the classpath.

However, in our OSGi context, EMF is also dependent on
org.eclipse.runtine and this pulls in a whole bunch of Eclipse specific
plugins, which we don't want to have, i.e.

* org.eclipse.core.contenttype
* org.eclipse.core.jobs
* org.eclipse.core.runtime
* org.eclipse.equinox.app
* org.eclipse.equinox.common
* org.eclipse.equinox.preferences
* org.eclipse.equinox.registry

Any way to use "plain EMF" in an OSGi context?

As a workaround I could create a new bundle and put the three core EMF
bundles into this plain bundle. Sounds like a bad hack.
Any other best practices?

Cheers,
Hauke
Re: EMF dependencies in plain OSGi application [message #902019 is a reply to message #902002] Wed, 15 August 2012 14:05 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Hauke,

You can look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=328227 for
some details. Repackaging is the simplest approach...


On 15/08/2012 2:58 PM, Hauke Fuhrmann wrote:
> Hi there,
>
> we want to use EMF in a plain OSGi application, where even equinox
> might be replaced by some other OSGi kernel (e.g. felix).
>
> By "use" I mean that we want to use the generated classes and saving
> and loading of resources.
>
> I understand the main requirements for EMF are
> * org.eclipse.emf.ecore
> * org.eclipse.emf.common
> * org.eclipse.emf.ecore.xmi if you want XMI support
>
> In a plain Java application it is sufficient to put those jar files
> into the classpath.
>
> However, in our OSGi context, EMF is also dependent on
> org.eclipse.runtine and this pulls in a whole bunch of Eclipse
> specific plugins, which we don't want to have, i.e.
>
> * org.eclipse.core.contenttype
> * org.eclipse.core.jobs
> * org.eclipse.core.runtime
> * org.eclipse.equinox.app
> * org.eclipse.equinox.common
> * org.eclipse.equinox.preferences
> * org.eclipse.equinox.registry
>
> Any way to use "plain EMF" in an OSGi context?
>
> As a workaround I could create a new bundle and put the three core EMF
> bundles into this plain bundle. Sounds like a bad hack.
> Any other best practices?
>
> Cheers,
> Hauke


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Overriding standard ECore validation messages
Next Topic:[EMF-Databinding] TableViewer databinding to add, remove and changes values from a list
Goto Forum:
  


Current Time: Thu Apr 25 14:09:13 GMT 2024

Powered by FUDForum. Page generated in 0.03163 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top