I have some ant files that one imports the other. Specifically build.xml
imports a project_default.xml
. When I try to do a build I get following error:
Buildfile: C:\myproject\build.xml [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.
BUILD FAILED C:\myproject\build.xml:14: The following error occurred while executing this line: C:\myproject\project_default.xml:17: Problem: failed to create task or type if Cause: The name is undefined. Action: Check the spelling. Action: Check that any custom tasks/types have been declared. Action: Check that any / declarations have taken place.
Line 17 that is reported is the following:
<if>
<contains string="${env.PROJECT_SELECTION}" substring="env.PROJECT_SELECTION" />
I also added the following in the build.xml
:
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="D:\UserData\ant-contrib-0.6-bin\lib\ant-contrib-0.6.jar"/>
</classpath>
</taskdef>
But got the same error. Any idea of what is the problem here?