views:

201

answers:

1

The plug-in really needs to be unpacked, yes I know it shouldn't care, but it does. I just want to make this warning go away, how do I do that?

+1  A: 

Try setting Bundle-ClassPath in your manifest.

This header tells OSGi where in your bundle to find the classes. If not specified, the default value is ".", which means the root of your bundle.

PDE/UI is basing this warning on whether or not it thinks your bundle should be a jar. One of the things it bases the decision on is whether or not the Bundle-ClassPath contains ".". (In a folder shaped bundle, this would mean .class files in the root folder instead of a jar).

For example, the bundle org.eclipse.pde.build ships as a folder, all the class files are in nested jars, and it has Bundle-ClassPath: pdebuild.jar

If you don't contain any class files, and have no nested jars, you could probably just specify some arbitrary folder in your bundle.

Andrew Niefer
Here are the steps I used to do what you suggested via the UI:On the Build tab: remove the . libary.Click Add Library... and put in the name of a jar file.Click Add Folder... to add your src dir.Switch to the Runtime tab.Click the New... button in the Classpath section and fill in the name of the jar file you just created.
Jeremy
Setting Bundle-ClassPath: META-INF also worked to make the warning go away without actually changing anything.
Jeremy