Some bundles (for example org.junit4, or org.eclipse.osgi.util) have a src.zip in CVS that is included in the source bundle via the src.includes property. When building individual source bundles, this src.zip should be unzipped into the root of the source bundle. This can be accomplished using customBuildCallbacks in the plug-in:

Revision as of 16:07, 28 November 2007

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.

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.

generate.plugin

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.

generateSourceBundle

Specific plug-ins may not require source bundles because they don't actually contain source. This may occur with platform specific fragments that only contain a native library. In this case, the bundles may be excluded by the feature as outlined above in generate.feature.

Or, bundles can explicitly specify in their own build.properties file that no source bundle should be generated for them:

generateSourceBundle=false

src.zip in CVS

Some bundles (for example org.junit4, or org.eclipse.osgi.util) have a src.zip in CVS that is included in the source bundle via the src.includes property. When building individual source bundles, this src.zip should be unzipped into the root of the source bundle. This can be accomplished using customBuildCallbacks in the plug-in: