title: Cause: The name is undefined error from Ant
body: <p>Can you someone help me with below error from Ant? I tried adding antlib.xml or antcontrib.properties individually and together but nothing helped.</p>
  
  <pre><code>BUILD FAILED
  /home/apache/antScripts/build-deploy-WAR.xml:16: Problem: failed to create task or type list
  Cause: The name is undefined.
  Action: Check the spelling.
  Action: Check that any custom tasks/types have been declared.
  Action: Check that any &lt;presetdef&gt;/&lt;macrodef&gt; declarations have taken place.
  </code></pre>
  
  <p>Here is the build.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="WAR Deployment" basedir="."&gt;
  &lt;taskdef resource="net/sf/antcontrib/antlib.xml" classpath="/tmp/ant-contrib/ant-contrib-1.0b3.jar"/&gt;
  &lt;taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="/tmp/ant-contrib/ant-contrib-1.0b3.jar"/&gt;
  &lt;target name="deploy" depends="app.status" if="app.notInstalled"&gt;
          &lt;deploy url="${name.app.url}" username="${name.app.user}" password="{name.app.password}" path="${name.app.context.path}"/&gt;
  &lt;/target&gt;
  
  &lt;target name="deploy.war" depends="app.status" if="app.deployable"&gt;
          &lt;deploy url="${name.app.url}" username="${name.app.user}" password="{name.app.password}" update="${name.app.update}" path="${name.app.context.path}" war="${name.app.war.path}"/&gt;
  &lt;/target&gt;
  
  &lt;target name="app.status"&gt;
          &lt;property name="running" value="${name.app.context.path}:running"/&gt;
          &lt;property name="stopped" value="${name.app.context.path}:stopped"/&gt;
          &lt;list url="${name.app.url}" outputproperty="ctx.status" username="${name.app.user}" password="{name.app.password}"/&gt;
  
          &lt;condition property="app.running"&gt;
                  &lt;contains string="${ctx.status}" substring="${running}"/&gt;
          &lt;/condition&gt;
  
          &lt;condition property="app.stopped"&gt;
                  &lt;contains string="${ctx.status}" substring="${stopped}"/&gt;
          &lt;/condition&gt;
  
          &lt;condition property="app.notInstalled"&gt;
              &lt;and&gt;
                  &lt;isfalse value="${app.running}"/&gt;
                  &lt;isfalse value="${app.stopped}"/&gt;
              &lt;/and&gt;
          &lt;/condition&gt;
  
          &lt;condition property="app.deployable"&gt;
              &lt;or&gt;
                  &lt;istrue value="${app.notInstalled}"/&gt;
                  &lt;and&gt;
                      &lt;istrue value="${app.running}"/&gt;
                      &lt;istrue value="${name.app.update}"/&gt;
                  &lt;/and&gt;
                  &lt;and&gt;
                      &lt;istrue value="${app.stopped}"/&gt;
                      &lt;istrue value="${name.app.update}"/&gt;
                  &lt;/and&gt;
              &lt;/or&gt;
          &lt;/condition&gt;
          &lt;condition property="app.undeployable"&gt;
              &lt;or&gt;
                  &lt;istrue value="${app.running}"/&gt;
                  &lt;istrue value="${app.stopped}"/&gt;
              &lt;/or&gt;
          &lt;/condition&gt;
  &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I have all the tomcat 4 required jar files.</p>
  
  <pre><code>catalina-ant
  tomcat-coyote
  tomcat-util
  tomcat-juli
  </code></pre>
  
  <p>Tomcat Version: 9.0.22.</p>