public class ExecuteBuildersTask extends AbstractProjectBasedTask
.project
file an Ant target. The dependend targets of a target
for a builder are executed too. A target is not executed if it's
if
or unless
conditions are not satisfied.
TODO Allow to execute each target in an own project (as in the antcall-task)
TODO Support different kind of triggers
TODO Support arguments of buildersModifier and Type | Field and Description |
---|---|
static java.lang.String |
CURRENT_BUILDCOMMAND_NAME
This property contains the name of the buildcommand that is currently executed.
|
static java.lang.String |
DEFAULT_TARGET_NAME
This target name is executed if no other target for a builder could be
found.
|
Constructor and Description |
---|
ExecuteBuildersTask() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
java.lang.String |
getDefaultTargetName() |
protected Target |
getTarget(java.lang.String targetName)
Returns the target with the given targetName or null if no such target
exists in the current project
|
protected java.lang.String |
getTargetNameForBuildCommand(BuildCommand buildCommand,
java.lang.String defaultTargetName)
Returns the target for a buildCommand.
|
void |
setDefaultTargetName(java.lang.String defaultTargetName) |
ensureJavaProject, getEclipseProject, getWorkspace, hasText, isProjectNameSet, isProjectSet, isWorkspaceSet, requireWorkspaceAndProjectNameOrProjectSet, requireWorkspaceSet, setInitialiseWorkspace, setProject, setProjectName, setWorkspace
public static final java.lang.String DEFAULT_TARGET_NAME
public static final java.lang.String CURRENT_BUILDCOMMAND_NAME
A usage for this property could be the default-builder target that
wants to know which builder was defined in the .project
but has no target defined
public java.lang.String getDefaultTargetName()
public void setDefaultTargetName(java.lang.String defaultTargetName)
public void execute() throws BuildException
BuildException
protected java.lang.String getTargetNameForBuildCommand(BuildCommand buildCommand, java.lang.String defaultTargetName)
The name for a target is determined in the following order:
builder.full-buildcommand-name.target
is defined,
it's value will be used as the target namebuilder.buildcommand-name.target
is defined, it's
value will be used as the target name
Note: full-buildcommand-name is the complete name of a
buildCommand as defined in a .project
-file, like
org.eclipse.jdt.core.javabuilder
while buildcommand-name
is the "unqualified" name of a builder, like javabuilder
.
protected Target getTarget(java.lang.String targetName)