Hi Dileepa,
I am not an Eclipse dev, but hopefully this will help you to better understand the difference between p2 and OSGi.
I like to think of p2 as a component repository and a tool to
configure which bundles will be available in OSGi runtime once Eclipse
is started. On the other hand, as soon as Eclipse is launched, it is
straightforward to install and uninstall various OSGi bundles
dynamically. Thus, if you want to dynamically load and unload feature
groups at runtime, it is probably better to use OSGi API, whereas if you
want to have several related Eclipse-based applications created on
demand, it is probably better to use p2 API. Under "feature groups" I really meant a "not too heavy" set of features with non-conflicting requirements which can be swapped at runtime, and under "related applications" I meant a bigger set of features with potentially conflicting requirements which can only be swapped after a restart.
Regards,
Mikhail
From: "Ian Bull" <irbull@xxxxxxxxxxxxxxxxx>
To: "P2 developer discussions" <p2-dev@xxxxxxxxxxx>
Sent: Friday, January 18, 2013 7:54:06 PM
Subject: Re: [p2-dev] Loading different P2 Profiles during runtime
Targets have a special meaning in Eclipse, and they are "development time" artifacts. In particular, that bug you pointed to (bug 287619) is about using p2 profiles at development time, so I'm that will not help you with the runtime aspects. If what your trying to do is "pool" several different applications together (so they share a common set of bundles), and allow the user to choose which which application to start, I would structure this a multiple p2 profiles. You likely need to create your own "configurator" to start that application, but it should be possible.
cheers,
ian
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev