Search in sources :

Example 1 with IvyTask

use of org.apache.ivy.ant.IvyTask in project build-info by JFrogDev.

the class ArtifactoryBuildListener method extractIvyTask.

private Task extractIvyTask(BuildEvent event) {
    Task task = event.getTask();
    // Handle ivy tasks that are wrapped
    if (task instanceof UnknownElement) {
        UnknownElement unknown = (UnknownElement) task;
        Object realThing = unknown.getRealThing();
        if (realThing == null) {
            unknown.maybeConfigure();
        }
        realThing = unknown.getRealThing();
        if (realThing instanceof Task) {
            task = (Task) realThing;
        }
    }
    // Interested only in Ivy tasks
    String taskType = task.getTaskType();
    if (taskType != null && (taskType.contains("org.apache.ivy") || taskType.contains("fr.jayasoft.ivy") || task instanceof IvyTask)) {
        return task;
    }
    return null;
}
Also used : IvyTask(org.apache.ivy.ant.IvyTask) IvyTask(org.apache.ivy.ant.IvyTask)

Aggregations

IvyTask (org.apache.ivy.ant.IvyTask)1