I hope these fall under the "clueless newbie" category.

Here's my directory structure (I am most regrettably on Window$ 95):

  c:\src\java\anttest\gub
  c:\src\java\anttest\build.xml
  c:\src\java\anttest\build

My buildfile looks like this:

  <project name="anttest" default="compile" basedir=".">
    <target name="init">
      <tstamp/>
      <property name="srcdir" value="./gub" />
      <property name="builddir" value="./build" />
      <filter token="version" value="0.8" />
      <filter token="year" value="2000" />
    </target>
    <target name="compile" depends="init">
      <javac srcdir="${srcdir}" destdir="${builddir}" filtering="off" />
    </target>
    </project>

When I ant this, I get:

  cd c:/src/java/anttest/
  ant
  Buildfile: build.xml

  init:

  compile:
      [javac] Compiling 1 source files to C:\src\java\anttest\build

  BUILD SUCCESSFUL

  Total time: 2 seconds

...which is fine.  When I ant this again without touching or saving
anything, I get the same output.  And again, and again.  I was under the
impression that the javac task would not recompile things that don't need to
be recompiled, but this appears to be false.  Can someone please verify this
problem?  How do I make the javac task only compile those things that need
to be compiled?

Cheers,
Laird

Reply via email to