Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-build-dev] Classpath order in PDE builds

Hello PDE Developers,

first of all, sorry for intruding on a developer mailing list, but I
couldn't find a newsgroup that seemed appropriate for my question.

I have an Eclipse plug-in that depends on JDK 1.4 and DOM level 3. The JDK
1.4 libraries contain only the DOM level 2 API, so the plug-in brings its
own xml-apis.jar, which is added to the Bundle-ClassPath attribute in the
MANIFEST.MF file. To prevent the DOM level 2 libraries from being picked
up, the plug-in's compile-time classpath lists the plug-in dependencies
container before the JRE system library, i.e.:

 <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

So, as far as the regular Java builders are concerned everything compiles
fine.
Now, when I want to package the plug-in for distribution on an update site
using the "Export -> Deployable Features" wizard I get a number of
compilation errors that clearly indicate that the PDE build is compiling
against the DOM Level 2 API. For example, I get errors like "The method
adoptNode(Node) is undefined for the type Document" (which it isn't in DOM
Level 2).

My build.properties file contains an extra entry for the DOM Level 3 API and
implementation that ship with the plug-in:

jars.extra.classpath=xml-apis.jar, xercesImpl.jar

This entry undoubtedly adds those JARs to the classpath, but unfortunately
after the JDK 1.4 libraries. Consequently, the PDE build compiles against
the DOM Level 2 that comes with JDK 1.4.

Unfortuntately, the "quick fix" of compiling and running with JDK 1.5 (which
includes DOM Level 3) is not an option for me at this point. Also, there is
the general question how to handle situations where one needs to override
an API that is included in the JDK with a more up-to-date version of that
same API (I'm sure that newer versions exists for a lot of the 3rd party
APIs that are included in JDK 1.5).

Is there a general way to specify the order of classpath entries in the
build.properties file?

Thanks in advance for any pointers and suggestions!

Mirko



Back to the top