title: apache ant - No source files and no packages have been specified
body: <p>I tried to learned apache ant by this tutorial <a href="http://www.vogella.com/articles/ApacheAnt/article.html" rel="nofollow">Apache Ant - tutorial </a></p>
  
  <p>but after I created step by step build file and run it throws:</p>
  
  <pre><code>compile:
      [javac] /home/nazar_art/workspace/de.vogella.build.ant.first/src/test/build.xml:27: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
  jar:
        [jar] Building MANIFEST-only jar: /home/nazar_art/workspace/de.vogella.build.ant.first/src/test/dist/de.vogella.build.test.ant.jar
  docs:
  
  BUILD FAILED
  /home/nazar_art/workspace/de.vogella.build.ant.first/src/test/build.xml:34: No source files and no packages have been specified.
  </code></pre>
  
  <p>I can't understand why this happened?
  I use Ubuntu 12.04 OS, and Eclipse Indigo.</p>
  
  <p><em><strong>build.xml:</em></strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project name="Ant-Test" default="main" basedir="."&gt;
    &lt;!-- Sets variables which can later be used. --&gt;
    &lt;!-- The value of a property is accessed via ${} --&gt;
    &lt;property name="src.dir" location="src" /&gt;
    &lt;property name="build.dir" location="bin" /&gt;
    &lt;property name="dist.dir" location="dist" /&gt;
    &lt;property name="docs.dir" location="docs" /&gt;
  
    &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;!-- Compiles the java code (including the usage of library for JUnit --&gt;
    &lt;target name="compile" depends="clean, makedir"&gt;
      &lt;javac srcdir="${src.dir}" destdir="${build.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}\de.vogella.build.test.ant.jar" basedir="${build.dir}"&gt;
        &lt;manifest&gt;
          &lt;attribute name="Main-Class" value="test.Main" /&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><em><strong>Code part:</em></strong></p>
  
  <pre><code>package math;
  
  public class MyMath {
    public int multi(int number1, int number2) {
      return number1 * number2;
    }
  } 
  
  package test;
  
  import math.MyMath;
  
  public class Main {
    public static void main(String[] args) {
      MyMath math = new MyMath();
      System.out.println("Result is: " + math.multi(5, 10));
    }
  } 
  </code></pre>
  
  <ul>
  <li>How to solve this trouble?</li>
  </ul>