PDE/Build builds plug-ins. It is used behind the scenes during export, and it is used for automated headless builds. The purpose of this page is to answer some of the commond questions that arise.

+

{{PDE}}

−

A lot of documentation was written for PDE/Build in 3.2. Reading the docs will be useful, start [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.pde.doc.user/guide/tasks/pde_feature_build.htm here].

+

PDE/Build builds plug-ins. It is used behind the scenes during export, and it is used for automated headless builds. The purpose of this page is to answer some of the common questions that arise.

−

==Java source level problems during Export==

+

==Documentation==

−

*I set my compliance levels, why doesn't it work?

+

There is a significant amount of documentation in the Eclipse Help system under "Plug-in Development Environment Guide > Tasks > PDE Build". The latest version of Eclipse Help is always available online at [http://help.eclipse.org help.eclipse.org]. Helios documentation for PDE/Build starts [http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_feature_build.htm here].

−

*How do I Compile against arbitrary JDKs?

+

−

*java.lang.UnsupportedClassVersionError

+

−

PDE/UI performs the export by using PDE/Build to generate build scripts. PDE/Build does not know anything about the Java Builder settings in your workspace or on your project. Your plug-in's manifest.mf and build.properties files are the input to PDE/Build. See [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.pde.doc.user/guide/tasks/pde_compilation_env.htm this page] for specifics on controlling the compilation environment for your plug-in.

* Building for p2 [http://help.eclipse.org/helios/index.jsp?nav=/4_2_2]

−

The properties specifying the locations of the JDKs to compile against are automatically set during export by PDE/UI based on your installed JREs: Preferences->Java->Installed JREs->Execution Environment.

Bugs: If you are using .qualifier in your bundle's version, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=153778 bug 153778].

−

==Including files in the root of my build==

+

[[Category:PDE|Build]] [[Category:PDE/Build]]

−

Files can be included in the root of your build by using a Feature. See [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.pde.doc.user/reference/pde_feature_generating_build.htm this page] for the root properties to set in your feature's build.properties file.

+

−

+

−

If you are doing a product build using productBuild.xml and a .product file instead of a normal feature driven build, then you must somehow include your feature containing the root files. There are two possibilities for doing this:

+

−

#Have your .product file based on features, and include your root feature. If your root feature does not containg the <tt>bin.includes</tt> property, then it will not be included in the final build results, but the root files will be.

+

−

#If your .product file is based on plug-ins, you need to get your feature to be included in the generated container feature that is driving the product build. The feature generator allows you to specify a list of additional features and plug-ins to be included. Use the featureList property to add your root feature. Note that in 3.2, the productBuild.xml script did not pass this property to the feature generator ([https://bugs.eclipse.org/bugs/show_bug.cgi?id=158761 bug 158761]). You will need to add it to the productBuild.xml:

+

−

<code>

+

−

<target name="generateFeature">

+

−

<eclipse.generateFeature

+

−

featureId="org.eclipse.pde.build.container.feature"

+

−

buildDirectory="${buildDirectory}"

+

−

baseLocation="${baseLocation}"

+

−

productFile="${product}"

+

−

verify="${verify}"

+

−

pluginPath="${pluginPath}"

+

−

configInfo="${configs}"

+

−

pluginList="${pluginList}"

+

−

featureList="${featureList}"

+

−

/>

+

−

</target>

+

−

</code>

+

−

+

−

==Fetching the .product file in a product build==

+

−

When using the productBuild.xml and a .product file to build your product, the feature or plug-in that contains the .product file must exist on disk before the fetch phase of the build. This is because we need to generate the container feature first so that we know what we need to fetch.

+

−

+

−

You can fetch the feature/plug-in containing the .product file using a custom step earlier on in the build. Use customTargets.xml, in the postSetup target, call ${genericTargets}/fetchElement. Something like:

PDE/Build builds plug-ins. It is used behind the scenes during export, and it is used for automated headless builds. The purpose of this page is to answer some of the common questions that arise.

Documentation

There is a significant amount of documentation in the Eclipse Help system under "Plug-in Development Environment Guide > Tasks > PDE Build". The latest version of Eclipse Help is always available online at help.eclipse.org. Helios documentation for PDE/Build starts here.