Hi,
 
To figure out which classes are out-of-date, the javac task assumes that the directory structure under the source directory matches the package hierarchy of your classes.  So, if you have a class com.foo.SomeClass, the source file needs to be at <srcdir>/com/foo/SomeClass.java.  For a source file that isn't in the correct relative position under the source dir, ant uses the wrong path to look for the class file under the destination directory.  Since ant doesn't find the class file there, it decides that the source file needs to be compiled.
 
 
Adam
-----Original Message-----
From: dsmith@globalone.net [mailto:dsmith@globalone.net]On Behalf Of Dan Smith
Sent: Wednesday, 11 October 2000 3:41 AM
To: ant-user@jakarta.apache.org
Subject: Re: dependencies in Ant?

I was just about to post a question in the opposite direction.  I have all my files listed in an external file named 'javafiles.dat'.  When I run ant, all my java files are re-compiled when not one of them has changed.  My target looks like this:

    <target name="compile">
        <javac srcdir=".:${src.dir}"
            includesfile="javafiles.dat"
            destdir="${build.classes.dir}"
            optimize="on">
            <classpath>
                <pathelement path="${classpath}"/>
                <pathelement path="${build.classpath}"/>
            </classpath>
            <include name="*.java" if="development"/>
        </javac>

        <!-- Copies support files to the build directory                     -->
       <copydir src="${src.dir}"
                 dest="${build.classes.dir}"
                 includes="${cws.packageprefix}/common/**/*.properties"
        />
    </target>

Is my use of 'includesfile' telling the javac to recompile everytime?

The problem gets worse when I run 'ant compile' followed by 'ant jarall'.  'jarall' depends on 'compile' and everything is compiled again!

Any suggestions?
Dan

-- 
"Sometimes I wish I could be you, just so I could be friends with me."
                -- Agelica Pickles