Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

PDE/Build

< PDE
Revision as of 15:41, 20 October 2006 by RKeelan.ca.ibm.com (Talk | contribs)

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.

A lot of documentation was written for PDE/Build in 3.2. Reading the docs will be useful, start here.

Java source level problems during Export

  • I set my compliance levels, why doesn't it work?
  • 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 this page for specifics on controlling the compilation environment for your plug-in.

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.

So, to set your compilation environment:

  1. Setup your installed JREs in your preferences.
  2. Set your Bundle-RequiredExecutionEnvironment in your manifest.
  3. or set jre.compilation.profile in your build.properties
  4. or set javacSource, javacTarget in your build.properties

Bugs: If you are using .qualifier in your bundle's version, see bug 153778.

Including files in the root of my build

Files can be included in the root of your build by using a Feature. See 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:

  1. Have your .product file based on features, and include your root feature. If your root feature does not containg the bin.includes property, then it will not be included in the final build results, but the root files will be.
  2. 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 (bug 158761). You will need to add it to the productBuild.xml:

<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>

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:

 <ant antfile="${genericTargets}" target="fetchElement">
    <property name="type" value="feature"/>
    <property name="id" value="org.feature.containing.product.file" />
 </ant>

See bug 159128.

Problems parsing feature file in a product build

Error is something like:

org.eclipse.pde.build_3.2.0.v20060601\scripts\productBuild\productBuild.xml:45: 
Problems parsing the feature file:/build/features/org.eclipse.pde.build.container.feature/feature.xml.

or:

[eclipse.generateFeature] Could not read:
file:/tmp/builder/build/tempbuild/features/org.eclipse.pde.build.container.feature/feature.xml

This is bug 152577. The workaround is to modify the productBuild.xml to delete the feature before its regeneration in the generateFeature target:

 <target name="generateFeature">
    <delete dir="${buildDirectory}/features/org.eclipse.pde.build.container.feature"/>
    <eclipse.generateFeature
       featureId="org.eclipse.pde.build.container.feature"
       buildDirectory="${buildDirectory}"
       baseLocation="${baseLocation}"
       productFile="${product}"
       verify="${verify}"
       pluginPath="${pluginPath}"
       configInfo="${configs}"
    />
 </target>


12:23, 11 October 2006 (EDT) Special:Contributions/Aniefer.ca.ibm.com

Copyright © Eclipse Foundation, Inc. All Rights Reserved.