Only the org.eclipse.core.runtime.products
extension supports the life cycle class, you can't define life cycles for plugins or fragments.
If you want to define OSGi services you can do that with a Component Definition
. OSGi services are automatically added to the IEclipseContext
.
You can also use a ContextFunction
to lazily add to the context. see here
You can also add to the context using an Addon