title: Please help me resolve my Ant + Ivy + Java build/dependency issues
body: <p>I can get Eclipse to export a standalone JAR file which works fine.  But when I try to use my build.xml file with Ant I get about 100 errors because a bunch of references can not be resolved.</p>
  
  <p>Here is my build.xml
      
      
        
        
        
        
        
        </p>
  
  <pre><code>  &lt;!-- Deletes the existing build, docs and dist directory--&gt;
    &lt;target name="clean"&gt;
      &lt;delete dir="${build.dir}" /&gt;
      &lt;delete dir="${docs.dir}" /&gt;
      &lt;delete dir="${dist.dir}" /&gt;
    &lt;/target&gt;
  
    &lt;!-- Creates the  build, docs and dist directory--&gt;
    &lt;target name="makedir"&gt;
      &lt;mkdir dir="${build.dir}" /&gt;
      &lt;mkdir dir="${docs.dir}" /&gt;
      &lt;mkdir dir="${dist.dir}" /&gt;
    &lt;/target&gt;
  
        &lt;!-- ================================= 
              target: resolve              
             ================================= --&gt;
        &lt;target name="resolve" description="--&gt; retrieve dependencies with ivy"&gt;
            &lt;ivy:retrieve /&gt;
        &lt;/target&gt;
  
    &lt;!-- Compiles the java code (including the usage of library for JUnit --&gt;
    &lt;target name="compile" depends="resolve,clean, makedir"&gt;
      &lt;javac destdir="${build.dir}" includeantruntime="false"&gt;
          &lt;src path="${src.dir}"/&gt;
          &lt;src path="${lib.dir}"/&gt;
      &lt;/javac&gt;
  
    &lt;/target&gt;
  
    &lt;!-- Creates Javadoc --&gt;
    &lt;target name="docs" depends="compile"&gt;
      &lt;javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}"&gt;
        &lt;!-- Define which files / directory should get included, we include all --&gt;
         &lt;fileset dir="${src.dir}"&gt;
                  &lt;include name="**" /&gt;
             &lt;/fileset&gt;
      &lt;/javadoc&gt;
    &lt;/target&gt;
  
    &lt;!--Creates the deployable jar file  --&gt;
    &lt;target name="jar" depends="compile"&gt;
      &lt;jar destfile="${dist.dir}\hcm.jar" basedir="${build.dir}"&gt;
        &lt;manifest&gt;
          &lt;attribute name="Main-Class" value="org.heromanager.MainWindow" /&gt;
        &lt;/manifest&gt;
      &lt;/jar&gt;
    &lt;/target&gt;
  
    &lt;target name="main" depends="compile, jar, docs"&gt;
      &lt;description&gt;Main target&lt;/description&gt;
    &lt;/target&gt;
  
  &lt;/project&gt; 
  </code></pre>
  
  <p>Here is the ivy.xml file</p>
  
  <pre><code>&lt;ivy-module version="2.0"&gt;
      &lt;info organisation="org.herocombatmanager" module="mainwindow"/&gt;
      &lt;dependencies&gt;
          &lt;dependency org="org.apache.commons" name="commons-lang3" rev="3.0"/&gt;
          &lt;dependency org="com.jgoodies" name="looks" rev="2.2.2"/&gt;
          &lt;dependency org="com.jgoodies" name="forms" rev="1.2.1"/&gt;
      &lt;/dependencies&gt;
  &lt;/ivy-module&gt;
  </code></pre>
  
  <p>And here are a few of the errors :-)</p>
  
  <pre><code>[javac] H:\Development\Workspace\HeroCombatManager\src\org\herocombatmanager\XMLParser.java:3: package org.apache.commons.lang3 does not exist
  [javac] import org.apache.commons.lang3.StringUtils;
  [javac]                                ^
  [javac] H:\Development\Workspace\HeroCombatManager\src\org\herocombatmanager\AttackAdvantagesPanel.java:10: package com.jgoodies.forms.factories does not exist
  [javac] import com.jgoodies.forms.factories.FormFactory;
  [javac]                                    ^
  [javac] H:\Development\Workspace\HeroCombatManager\src\org\herocombatmanager\AttackAdvantagesPanel.java:11: package com.jgoodies.forms.layout does not exist
  [javac] import com.jgoodies.forms.layout.*;
  [javac] ^
  ...
  [javac] H:\Development\Workspace\HeroCombatManager\src\org\herocombatmanager\AttackAdvantagesPanel.java:40: cannot find symbol
  [javac] symbol  : class FormLayout
  [javac] location: class org.herocombatmanager.AttackAdvantagesPanel
  [javac]         this.setLayout(new FormLayout(new ColumnSpec[] {
  [javac]                            ^
  [javac] H:\Development\Workspace\HeroCombatManager\src\org\herocombatmanager\AttackAdvantagesPanel.java:40: cannot find symbol
  [javac] symbol  : class ColumnSpec
  [javac] location: class org.herocombatmanager.AttackAdvantagesPanel
  [javac]         this.setLayout(new FormLayout(new ColumnSpec[] {
  [javac]                                           ^
  </code></pre>
  
  <p>Thank you all in advance.. </p>