title: Ant script to generate Jar - Reference not found error
body: <p>I have following ant script to generate the jar file</p>
  
  <pre><code>&lt;project name="myProject" basedir="." default="jar"&gt;
  &lt;property name="src" value="Java Source"/&gt;
  &lt;property name="output" value="bin"/&gt;
  
  &lt;target name="compile" depends="create"&gt;
      &lt;javac destdir="bin"&gt;
          &lt;src path="${src}"/&gt;
          &lt;classpath refid="myProject.classpath"/&gt;
      &lt;/javac&gt;
  &lt;/target&gt;
  
  &lt;target name="jar" depends="compile"&gt;
      &lt;jar destfile="myProject.jar"&gt;
          &lt;fileset dir="bin"/&gt;
      &lt;/jar&gt;
  &lt;/target&gt;
  
  
  &lt;target name="clean"&gt;
      &lt;delete dir="${output}"/&gt;
  &lt;/target&gt;
  
  &lt;target name="create" depends="clean"&gt;
      &lt;mkdir dir="${output}"/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p></p>
  
  <p>When I run ant script i get following error</p>
  
  <blockquote>
    <p>Reference myProject.classpath not found.</p>
  </blockquote>
  
  <p>I am not sure how to solve this error. It requires path of .classpath file ?
  I also tried with </p>
  
  <blockquote>
    <p>refid="classpath"</p>
  </blockquote>
  
  <p>and it didnt work.</p>
  
  <p>Can anyone help please!
  Thanks</p>