ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dubois, Fabien" <fabien.dub...@capgemini.com>
Subject Problem to use ant contrib
Date Wed, 30 Apr 2008 08:33:14 GMT
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 :-)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message