<getBuildOrder>
Description
The getBuildOrder task computes the order in which java projects of a workspace must be built. The task requires either a Team Project Set file containing the projects or a property with a list of project names to be computed.
The project set resp. the project names must contain
all needed projects. If a project that is referenced by a project listed
in the project set or in
projectNames is not included, the task will fail.
All projects that are needed to compute the build order must exist in the workspace, otherwise the task will fail.
Arguments
| Argument | Description | Required |
|---|---|---|
| workspace | Path to workspace containing the checked out projects | yes |
| initialiseWorkspace | Set to 'true' if your workspace contains projects which have project names that differ from the names of their project folders and the workspace doesn't contain a .metadata directory. | no (default: false) |
| projectset | Project Set File that contains the projects that should be computed | exactly one |
| projectNames | comma-separated list of project names that should be computed. | |
| buildorderProperty | Name of the property that holds a comma separated list with project names in the correct build order | yes |
| nonjavaprojecthandling | Determines how to handle projects without java nature. Allowed
values:
|
no (defaults to
fail) |
| allProjects | This switch allows to calculate the build order of all projects within the workspace. | no |
Examples
The following example reads a
Team Project Set file and "returns" a
Property that contains an ordered, comma-separated list with
the names of projects in the order they must be built. You can iterate over the
returned list by using the
foreach task of the ant-contrib project. For each item in a list,
the
foreach calls the specified Ant target: