title: ant: resource in jar could not be found. failed to create task or type classpath
body: <p>I have the following problem in ant:</p>
  
  <pre><code>[taskdef] Could not load definitions from resource net/sf/antcontrib/antcontri
  b.properties. It could not be found.
  
  BUILD FAILED
  build.xml:5: Problem:
  failed to create task or type classpath
  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>Running the following ant build.xml:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  &lt;project default="main" basedir="."&gt;    
      &lt;taskdef resource="net/sf/antcontrib/antcontrib.properties" /&gt;
      &lt;classpath&gt;
        &lt;fileset dir="."&gt;
          &lt;include name="**/*.jar" /&gt;
        &lt;/fileset&gt;
      &lt;/classpath&gt;
  
      &lt;target name="main"&gt;
  
      &lt;/target &gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Although, running </p>
  
  
  
  <pre><code>&lt;project default="main" basedir="."&gt;    
  
      &lt;path id="path.svnant"&gt;
          &lt;pathelement location="${basedir}/ant-contrib-1.0b3.jar" /&gt;
      &lt;/path&gt;
  
      &lt;typedef resource="net/sf/antcontrib/antcontrib.properties" classpathref="path.svnant" /&gt;
  
      &lt;target name="main"&gt;
  
      &lt;/target &gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Results no errors what so ever.</p>
  
  <p>So the question is why the first build.xml is wrong??</p>