diff --git a/src/main/org/apache/tools/ant/ComponentHelper.java b/src/main/org/apache/tools/ant/ComponentHelper.java index 5132874d5..560330a97 100644 --- a/src/main/org/apache/tools/ant/ComponentHelper.java +++ b/src/main/org/apache/tools/ant/ComponentHelper.java @@ -434,7 +434,15 @@ public class ComponentHelper { */ public Task createTask(String taskType) throws BuildException { Task task=createNewTask(taskType); - if(task!=null) { + if (task == null && taskType.equals("property")) { + // quick fix for Ant.java use of property before + // initializeing the project + addTaskDefinition("property", + org.apache.tools.ant.taskdefs.Property.class); + task = createNewTask(taskType); + } + + if (task != null) { addCreatedTask(taskType, task); } return task;