Description
This macro builds a complete eclipse product. This incorporates the build process for each feature/plugin declared by this product.
Important: This task is implemented as an Ant macro. To use this task, you have to import the file 'a4e-pde-macros.xml
' in your build file.
Arguments
The buildProduct
task provides the following arguments:
Argument | Description | Required |
---|---|---|
workspaceDirectory | Absolute path of the workspace directory | Either 'workspaceDirectory' or 'workspaceId' has to be specified |
workspaceId | The identifier of a defined workspace (see <workspaceDefinition>) | Either 'workspaceDirectory' or 'workspaceId' has to be specified |
productfile | The location of the product definition file. | yes |
targetPlatformId | The id of the target platform. | yes |
platformConfigurationId | The id of the platform configuration (for cross platform builds). | no |
destination | Name of the directory that will contain the completely built rcp application. | yes |
packageAsJar | If set to true the features/plugins will be packaged as a jar file. Otherwise they will be created as exploded directories. | no (default: false ) |
defaultCompilerOptionsFile | Absolute path to an eclipsed compiler options file that is used as the default compiler options file if no project specific file exists. | no |
os | The operating system to create the build for. Must be one of the following values: win32,solaris,macosx,linux. | no (default: win32) |
clearDestination | If set to true the destination directory will be cleaned up before the build actually takes place. | no (default: false) |
commandline | If set to true the commandline version of the rcp will be built. This is only relevant for win32 builds. | no (default: false) |
packageSources | If set to true source bundles will be created, too. | no (default: true) |
useEcj | Enables or disables the use of the ecj compiler as the backend. | no, default to true |
Lifecycle hooks
To allow the user of ant4eclipse to add additional build steps to the product build, the buildProduct
macro defines the following lifecycle hooks that are implement as macro elements. The scope information identifies the properties which are available within this macro define (check out the executeProduct
task description for detailed information).
Build phase | Description | Required | Scope |
---|---|---|---|
validate | Validate the project is correct and all necessary information is available. | no | forProduct |
deploy | Perform any operations necessary to prepare a package before the actual packaging. | no | forProduct |
Example usage
The following example builds a product with the project. The built product will be stored into 'd:/my-rcp
'.
<buildProduct workspaceDirectory="${workspace}" productfile="d:/my-rcp.product" targetPlatformId="eclipse-3.4" destination="d:/my-rcp" clearDestination="true" os="win32" />
The next example shows how to add additional build steps to the build process.
<buildProduct workspaceDirectory="${workspace}" productfile="d:/my-rcp.product" targetPlatformId="eclipse-3.4" destination="d:/my-rcp" clearDestination="true" os="win32" > <deploy> <!-- sometimes we just want to add some documentation --> <mkdir dir="d:/my-rcp/docs"/> <copy todir="d:/my-rcp/docs"> <fileset dir="V:/my-rcp/docs" includes="**/*"/> </copy> </deploy> </buildProduct>
- Printer-friendly version
- Login or register to post comments