PDE Build Extensions to the p2 Publisher

PDE Build contributes several ant tasks that extend the p2 publisher. These tasks allow PDE Build to publish metadata and artifacts directly into a p2 repository.

The generated build scripts use these tasks in the context of a full build where things like compiling class files and replacing versions are done. However, some of the tasks may be usefull in special cases to publish metadata directly without running a full build.

eclipse.publish.featuresAndBundles

This task is very similar to the p2.publish.featuresAndBundles task contributed by the p2 publisher. This task will publish metadata for pre-existing binary features and plug-ins which are not being built from source. The task will also publish categories based on a provided site.xml or category.xml file.

This task supports the following attributes:

metadataRepository A URI specifying the metadata repository to publish to.
artifactRepository A URI specifying the artifact repository to publish to.
repository Sets both metadataRepository and artifactRepository.
site A URL to a site.xml specifying category information.
category A URL to a category.xml specifyiny category information.
siteQualifier A qualifier used to ensure resulting category IUs have unique names.
<features> A nested fileset element specifying the locations of binary features to publish.
<bundles> A nested fileset element specifying the locations of binary plug-ins to publish.
Example:
 <eclipse.publish.featuresAndBundles repository="file:C:/build/repository" category="file:C:/build/category.xml" >
     <features dir="C:\eclipse\features\" includes="org.eclipse.cvs_1.1.100.v20090514-7E79FEc9BJ99r9XGQ3CICF" />
     <bundles dir="C:\eclipse\plugins" includes="org.eclipse.cvs_1.0.300.v20090520.jar" />
     <bundles dir="C:\eclipse\plugins" includes="org.eclipse.team.cvs.core_3.3.200.I20090430-0408.jar" />
     <bundles dir="C:\eclipse\plugins" includes="org.eclipse.team.cvs.ssh_3.2.100.I20090508-2000.jar" />

     <bundles dir="C:\eclipse\plugins" includes="org.eclipse.team.cvs.ssh2_3.2.200.I20090508-2000.jar" />
     <bundles dir="C:\eclipse\plugins" includes="org.eclipse.team.cvs.ui_3.3.200.I20090521-1750.jar" />
 </eclipse.publish.featuresAndBundles>

eclipse.gatherBundle

Publish a plug-in directly from source. Once the .class files for a bundle are compiled, this task will gather up all the files that make up the binary result and publish them as a p2 artifact with metadata. This task is used in the publish.bin.parts task in the plug-in's generated build.xml, this task replaces the gather.bin.parts task when you are building with the p2 publisher.

This task supports the following attributes:

metadataRepository A URI to the metadata repository to publish to.
artifactRepository A URI to the artifact repository to publish to.
buildResultFolder Folder containing built .class files, the Manifest and potentially .api_description files.
targetFolder Content when running with customBuildCallbacks.
baseDirectory Project location to gather content from when not using customBuildCallbacks
unpack Whether or not the plug-in should be unpacked into folder form when installed.
gatheredSource For source bundles, the location of the gather source.
<outputFolder> Nested elements specifying alternate locations to get .class files from, used when reusing .class files from the workspace. This is an ant FileSet with an additional "library" attribute specifying which library the class files belong to
Example:
 <eclipse.gatherBundle metadataRepository="file:/build/repo" artifactRepository="file:/build/repo"
                       buildResultFolder="${basedir}" baseDirectory="${basedir}" unpack="true" >
     <outputFolder library="lib/pdebuild-ant.jar" dir="${basedir}" includes="bin_ant/**" />

     <outputFolder library="pdebuild.jar" dir="${basedir}" includes="bin/**" />
 </eclipse.gatherBundle>

eclipse.gatherFeature

Publish a feature directly from source. This task will gather up all the files that make up the feature jar and publish them as a p2 artifact with metadata. This task will also publish artifacts containing any root files that are contributed by this feature. If the feature does not specify a bin.includes property, then the feature jar will not be generated, but there will still be root file artifacts and feature group metadata.

This task supports the following attributes:

metadataRepository A URI to the metadata repository to publish to.
artifactRepository A URI to the artifact repository to publish to.
buildResultFolder Folder containing a modified feature.xml with versions replaced.
targetFolder Content when running with customBuildCallbacks.
baseDirectory The feature project location
Example:
 <eclipse.gatherFeature
     metadataRepository="file:/build/repo"
     artifactRepository="file:/build/repo"
     buildResultFolder="${basedir}"
     baseDirectory="${basedir}"
 />


eclipse.brand.p2.artifacts

Brand launcher artifacts for a product and republish them with a new name for inclusion in the given product.

This task supports the following attributes:

metadataRepository A URI to the metadata repository to publish to.
artifactRepository A URI to the artifact repository to publish to.
config The configuration for which the launchers will be used. (eg "gtk.linux.x86")
iconsList Locations to find the icons to brand the executable with.
tempDirectory The location of a temporary directory that can be be used.
productId The id of the product we are publishing for.
productVersion The version of the product we are publishing for.
launcherName The name to give the new launcher.
launcherProvider The name of the IU which is providing the original launcher artifacts. By default this is "org.eclipse.equinox.executable", the task will be looking for artifacts named <launcherProvider>_root.<config>