title: Log4j not being added to classpath in Ant
body: <p>I'm attempting to add Log4j to my project's classpath in Ant which creates an executable JAR, but it appears that it's not being added properly.</p>
  
  <p>Here is the <code>path</code> component of my Ant build script:</p>
  
  <pre><code>&lt;path id="classpath.compile"&gt;
    &lt;fileset dir="${dir.myLibs}"&gt;
      &lt;include name="**/*.jar"/&gt;
    &lt;/fileset&gt;
    &lt;pathelement location="${dir.webContent}/WEB-INF/lib/log4j.jar" /&gt;
  &lt;/path&gt;
  </code></pre>
  
  <p>The compile target looks like this:</p>
  
  <pre><code>&lt;target name="-compile"&gt;
    &lt;javac destdir="${dir.binaries}" source="1.6" target="1.6" debug="true" includeantruntime="false"&gt;
      &lt;src path="${dir.source}"/&gt;
      &lt;classpath refid="classpath.compile"/&gt;
    &lt;/javac&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Tthe target that creates the JAR:</p>
  
  <pre><code>&lt;target name="-createJar" &gt;
    &lt;jar jarfile="${path.jarFile}"
       manifest="${dir.source}\META-INF\MANIFEST.MF"&gt;
      &lt;fileset dir="${dir.binaries}" casesensitive="yes"&gt;
        &lt;exclude name="**/*.java"/&gt;
      &lt;/fileset&gt;
    &lt;/jar&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>Lastly, the MANIFEST.MF:</p>
  
  <pre><code>Manifest-Version: 1.0
  Class-Path: ../../../WebContent/WEB-INF/lib/log4j.jar (what is this pathing relative to?)
  Main-Class: foo.Bar
  </code></pre>
  
  <p>The JAR is created, but when I execute it, I get:</p>
  
  <p><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger...</code></p>
  
  <p>Any thoughts as to what I'm doing wrong?</p>