TheAptKid
TheAptKid

Reputation: 1571

Cant reference org.osgi.* in plugins

Some time ago, I created a project with multiple OSGi plugins. Today I reinstalled Eclipse for RCP and RAP Developers, imported the project, and discovered that some errors are occurring in the plugins. Specifically, the org.osgi.* path can't be referenced:

enter image description here

Does anybody know, why this reference errors are occurring and how to resolve them?

Upvotes: 2

Views: 44

Answers (2)

Christian Schneider
Christian Schneider

Reputation: 19606

Maybe you are missing the target platform setup. This is where plugin projects get their build time dependencies from.

Upvotes: 0

M A
M A

Reputation: 72854

The project must be missing the required OSGi core dependencies on its classpath. There are two ways to resolve this:

  1. Make sure the project is created as a plugin project, and that the MANIFEST.MF exists. There should be a project creation wizard that allows you to create the project as an Eclipse plugin.

  2. If you use Maven in your project, the best way to manage your RCP projects is to use Tycho. It helps automatically resolving plugin dependencies and building your project (even from the command line) and is a much better solution for the long term.

Upvotes: 1

Related Questions