Why do my custom task containers see Unknown Elements in Ant 1.6 – they worked in Ant 1.5?
The objects added in TaskContainer.addTask(Task task) have changed from Tasks to UnknownElements. There was a number of valid reasons for this change. But the backward compatibility problems were not noticed until after Ant 1.6.0 was released. Your container class will need to be modified to check if the Task is an UnknownElement and call perform on it to convert it to a Task and to execute it. (see apache.tools.ant.taskdefs.Sequential) If you want to do more processing on the task, you need to use the techniques in apache.tools.ant.taskdefs.Antlib#execute() This does make use of one 1.6 method call (UE#getRealObject()), you need to use UE#getTask() instead – this will return null for non tasks (types like fileset id=x). So..
Related Questions
- When I use the runservertests Cactus custom Ant task, it starts my server allright but then hangs and the tests are not executed. What is happening?
- Why do my custom task containers see Unknown Elements in Ant 1.6 - they worked in Ant 1.5?
- What future developments are planned for the Ant Web Start Task?