views:

25

answers:

1

I have an eclipse plugin project that requires a lot of external jar file dependencies. The plugin places these on the Bundle-Classpath and includes them in the plugin when built through build.properties. If you export the plugin and run it through eclipse, everything works fine. When running through the launch configuration (ie: debugging), none of the extra jars are added to the classpath. Only class files from the source of the plugin are put on the classpath.

To show this easier, I put together a small dummy application.

Contents of Manifest.MF:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test-pde-project
Bundle-SymbolicName: test-pde-project
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime
Bundle-ClassPath: plugin-out.jar,
 lib/dummy.jar

Contents of build.properties:

source.plugin-out.jar = src/
output.. = bin/
bin.includes = META-INF/,\
               plugin-out.jar,\
               lib/dummy.jar

As you can see, plugin-out.jar contains the class files from my compiled plugin. The dummy.jar is a sample jar file that should be included with this plugin when running it. I would expect to see both of these in dev.properties when the PDE launches eclipse with this plugin. What actually happens though is this dev.properties is the one that is generated:

#
#Wed Oct 06 10:11:09 ADT 2010
test-pde-project=bin
@ignoredot@=true

Why is lib/dummy.jar not getting added to dev.properties? I did some reading around and my understanding is that it should be there? Can anyone tell me how I can get dummy.jar to be added to the runtime when running through the launch configuration?

A: 

I did some digging into the Eclipse PDE code to see if I could see what the problem was here that caused my issue. What I found seems to be a bug in how the classpath is determined. I created a bug at eclipse for this issue and also proceeded to create a patch that resolves the issue. Hopefully it will get accepted and be fixed in a future release.

If anyone else has this issue, consider using the patch attached to the bug here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=327371

Chris Dail