Hi everybody,
I try to use ant-contrib to create a task which detects if a file is present, and if not copy the file in the folder. So I have get back the source of ant-contrib, build and create the jar. This is my task : <target name="local.deploy.init" description="copy the jdbc librairy in the $CATALINA_HOME/lib"> <taskdef uri="antlib:net.sf.antcontrib" resource="net/sf/antcontrib/cpptasks/antlib.xml" classpath="${lib}/cpptasks.jar"/> <if> <fail file="${tomcat}/lib/mysql-connector-java-5.1.5-bin.jar"/> <then> <copy todir="${tomcat}/lib"> <fileset file="${lib}/mysql-connector-java-5.1.5-bin.jar"/> </copy> </then> </if> </target> Ant stops this task at the < if > (so there is no problem for the taskdef): D:\workspace\appWicket\trunk\build.xml:81: 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 <presetdef>/<macrodef> declarations have taken place. Moreover sourceforge is currently off, so I can't verify the syntax. If you can help me, thank you in advance :-)