Search in sources :

Example 11 with Task

use of org.apache.tools.ant.Task in project groovy by apache.

the class SpoofTaskContainer method execute.

public void execute() throws BuildException {
    spoof("begin SpoofTaskContainer execute");
    for (Iterator iter = tasks.iterator(); iter.hasNext(); ) {
        Task task = (Task) iter.next();
        task.perform();
    }
    spoof("end SpoofTaskContainer execute");
}
Also used : Task(org.apache.tools.ant.Task) Iterator(java.util.Iterator)

Example 12 with Task

use of org.apache.tools.ant.Task in project intellij-community by JetBrains.

the class IdeaAntLogger2 method isFailOnError.

private static boolean isFailOnError(BuildEvent event) {
    final Task task = event.getTask();
    if (task != null) {
        try {
            final Field field = task.getClass().getDeclaredField("failonerror");
            field.setAccessible(true);
            return !Boolean.FALSE.equals(field.get(task));
        } catch (Exception ignored) {
        }
    }
    // default value
    return true;
}
Also used : Field(java.lang.reflect.Field) Task(org.apache.tools.ant.Task)

Aggregations

Task (org.apache.tools.ant.Task)12 Project (org.apache.tools.ant.Project)5 Iterator (java.util.Iterator)2 AntIntrospector (com.intellij.lang.ant.AntIntrospector)1 ReflectedProject (com.intellij.lang.ant.ReflectedProject)1 XmlElement (com.intellij.psi.xml.XmlElement)1 XmlTag (com.intellij.psi.xml.XmlTag)1 Field (java.lang.reflect.Field)1 ExcelAntEvaluationResult (org.apache.poi.ss.excelant.util.ExcelAntEvaluationResult)1 BuildException (org.apache.tools.ant.BuildException)1 Target (org.apache.tools.ant.Target)1