PDEBuild/Individual Source Bundles
Starting in Eclipse 3.4, source can now be shipped as individual bundles instead of the old way of one bundle containing the source for multiple plug-ins. This allows us to be more flexible around how source is delivered, and has the happy side effect of reducing the path length problems sometimes encountered when using Feature Qualifier Suffixes.
This page outlines the steps necessary to generate individual source bundles when building your project. See the help page for a review of the old way of generating source.
In your build configuration's build.properties file, set the property
This tells pde.build that you want to generate the new-style source bundles. If you are lucky, this is all that is required. However, generally, things are never that easy.
In a feature's build.properties file, the generate.feature property tells pde.build to generate a source feature.
generate.feature@<source feature id> = <feature id> [, feature@<feature id>] [, plugin@<plugin id>[;version=<pluginVersion>][;unpack="false"]]
When generating individual source bundles, this property remains as before, the difference will be noticed in the resulting source feature. Before, the source feature would have included 1 source plugin + a source fragment for each platform being built. In the new way, the source feature will include a source bundle for each plug-in/fragment listed in the original feature.
Plug-ins that were included in the source feature via the plugin@ syntax will not get corresponding source bundles. This is useful for adding doc plug-ins to the source feature.
Some plug-ins that were included in the originating feature (ie doc plugins) may not have source and should be excluded from the generated source feature. This can be accomplished with the addition of exclude@<plugin id> arguments to the generate.feature property.
The generate.plugin generates a source bundle based on a given feature. When generating individual source bundles, this changes to be based on a given plug-in:
generate.plugin@<source plug-in id>=<plug-in id>
The generate.plugin property was used by features to include source without having a source feature (even though behind the scenes an entire source feature was generated). When generating individual source bundle, features will need to include a *.source bundle for each plug-in along with a corresponding generate.plugin property for each one.
Or, the generate.plugin property can be changed to a generate.feature property and the source feature included. By default a generated source feature does not have a bin.includes and will be excluded from the build.
Example: The sdk.examples feature used to look like this:
<feature id="org.eclipse.sdk.examples" ... > .... <plugin id="org.eclipse.sdk.examples.source" version="0.0.0"/> <plugin id="org.eclipse.sdk.examples.source.win32.win32.x86" version="0.0.0"/> </feature> firstname.lastname@example.org=org.eclipse.sdk.examples
This changes to:
<feature id="org.eclipse.sdk.examples" ...> ... <includes id="org.eclipse.sdk.examples.source" version="0.0.0"/> ... </feature> email@example.com=org.eclipse.sdk.examples
<feature id="org.eclipse.sdk.examples" ...> ... <plugin id="org.eclipse.compare.examples.source" version="0.0.0"/> <plugin id="org.eclipse.debug.examples.core.source" version="0.0.0"/> <plugin id="org.eclipse.swt.examples.source" version="0.0.0"/> </feature> firstname.lastname@example.org=org.eclipse.compare.examples email@example.com=org.eclipse.debug.examples.core firstname.lastname@example.org=org.eclipse.swt.examples