ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Metzger <ametz...@silkspeed.com>
Subject Re: javac always recompiles all files
Date Tue, 23 Jan 2001 01:01:13 GMT

Change your "srcdir" attribute to point just above your
"com" directory.



Chad Loder wrote:
> 
> Hello. I just downloaded ant and set up a simple
> build.xml (included below). It appears that the javac
> task is ALWAYS recompiling all the Java files, even
> when none of them have changed.
> 
> Am I missing something really obvious? I made sure that
> I touched all of the Java source files, just in case
> they somehow had modification times in the future, but
> Ant still compiles every time.
> 
> Thanks,
>         c
> 
> <project name="shared_java" default="all">
>     <property name="build.type" value="debug"/>
>     <property file="./build_${build.type}.properties"/>
>     <property name="build.dir" value="_${build.type}"/>
> 
>     <target name="all" depends="compile">
>     </target>
> 
>     <target name="prepare">
>        <mkdir dir="${build.dir}/classes"/>
>        <tstamp/>
>     </target>
> 
>     <target name="compile" depends="prepare">
>        <javac srcdir="com" destdir="${build.dir}/classes" debug="on"
>           deprecation="off" optimize="off"/>
>     </target>
> </project>

Mime
View raw message