<hasBuildCommand>
Description
The hasBuildCommand condition is an Ant Condition that
can be used to check if an Eclipse project has a specific
buildCommand. An Eclipse project can have several
Builders assigned to it. Those builders are normally
executed after a file has been saved (incremental build) or when a
full build is initiated (Project -> Clean...) (manual
build). A typical java project contains the
org.eclipse.jdt.core.javabuilder which invokes the
default Eclipse compiler on java sources. If you would like to
write build steps that depend on specific build commands, you can
use the hasBuildCommand condition which checks if a
project has a specified buildCommand.
The hasBuildCommand-condition can be used with ant's
native condition and waitfor tasks. (See
Condition
Task). It can also be used with the if-task from
the ant-contrib project to create build steps that check whether
some specific build commands exist or not.
Arguments
| Argument | Description | Required |
|---|---|---|
| project | Path to the project for which the output path should be build | either the project or the combination of workspace and projectName has to be specified. |
| workspace | Path to the workspace containing the projects | |
| projectName | Name of the project inside of the workspace for which the output path should be build | |
| buildCommand | Name of the build command that should be checked | yes |
Examples
The following example shows how to use the
hasBuildCommand-Condition in conjunction with the
if-task from the ant-contrib project