ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <>
Subject RE: dependencies in Ant?
Date Tue, 10 Oct 2000 21:36:28 GMT


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, the source file
needs to be at <srcdir>/com/foo/  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.

  -----Original Message-----
  From: []On Behalf Of Dan
  Sent: Wednesday, 11 October 2000 3:41 AM
  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}"
                  <pathelement path="${classpath}"/>
                  <pathelement path="${build.classpath}"/>
              <include name="*.java" if="development"/>

          <!-- Copies support files to the build
         <copydir src="${src.dir}"

  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?

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

View raw message