Java Code Examples for org.apache.tools.ant.Task#execute()

The following examples show how to use org.apache.tools.ant.Task#execute() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IncrementalDeploymentTask.java    From aws-ant-tasks with Apache License 2.0 6 votes vote down vote up
/**
 * Deploys all apps in this deployment group, then waits for all the
 * deployments in the group to succeed. Deployments in a group will run
 * in parallel.
 */
public void deployApps() {
    for (Task deployAppTask : deployAppTasks) {
        
        // This is in case of a rare bug that occurs in some JVM implementations
        if (deployAppTask instanceof UnknownElement) {
            deployAppTask.maybeConfigure();
            deployAppTask = ((UnknownElement) deployAppTask).getTask();
        }
        if (!deployAppTask.getTaskName().equals("deploy-opsworks-app")) {
            throw new BuildException(
                    "Only <deploy-opsworks-app> elements are supported");
        }
        deployAppTask.execute();
        deploymentIds.add(deployAppTask.getDescription());
    }

    try {
        waitForDeploymentGroupToSucceed(deploymentIds, client);
    } catch (InterruptedException e) {
        throw new BuildException(e.getMessage(), e);
    }
}
 
Example 2
Source File: ForEachTask.java    From development with Apache License 2.0 5 votes vote down vote up
@Override
public void execute() throws BuildException {
    final String bak = getProject().getProperty(property);
    for (String token : tokens) {
        getProject().setProperty(property, token);
        for (Task task : tasks) {
            task.maybeConfigure();
            task.execute();
        }
    }
    if (bak != null) {
        getProject().setProperty(property, bak);
    }
}
 
Example 3
Source File: TestFile.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void execute(Task task) {
    task.setProject(new Project());
    task.execute();
}
 
Example 4
Source File: AntUtil.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static void execute(Task task) {
    task.setProject(createProject());
    task.execute();
}
 
Example 5
Source File: TestFile.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void execute(Task task) {
    task.setProject(new Project());
    task.execute();
}
 
Example 6
Source File: AntUtil.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static void execute(Task task) {
    task.setProject(createProject());
    task.execute();
}
 
Example 7
Source File: TestFile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void execute(Task task) {
    task.setProject(new Project());
    task.execute();
}
 
Example 8
Source File: AntUtil.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static void execute(Task task) {
    task.setProject(createProject());
    task.execute();
}
 
Example 9
Source File: TestFile.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void execute(Task task) {
    task.setProject(new Project());
    task.execute();
}
 
Example 10
Source File: AntUtil.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public static void execute(Task task) {
    task.setProject(createProject());
    task.execute();
}