ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Smith <dan.sm...@globalone.net>
Subject Re: dependencies in Ant?
Date Tue, 10 Oct 2000 17:41:14 GMT
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
I was just about to post a question in the opposite direction.&nbsp; I
have all my files listed in an external file named 'javafiles.dat'.&nbsp;
When I run ant, all my java files are re-compiled when not one of them
has changed.&nbsp; My target looks like this:
<p>&nbsp;&nbsp;&nbsp; &lt;target name="compile">
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;javac
srcdir=".:${src.dir}"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
includesfile="javafiles.dat"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
destdir="${build.classes.dir}"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
optimize="on">
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;classpath>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;pathelement path="${classpath}"/>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;pathelement path="${build.classpath}"/>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/classpath>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;include name="*.java" if="development"/>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/javac>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--
Copies support files
to the build directory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-->
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;copydir src="${src.dir}"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
dest="${build.classes.dir}"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
includes="${cws.packageprefix}/common/**/*.properties"
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; />
<br>&nbsp;&nbsp;&nbsp; &lt;/target>
<p>Is my use of 'includesfile' telling the javac to recompile everytime?
<p>The problem gets worse when I run 'ant compile' followed by 'ant jarall'.&nbsp;
'jarall' depends on 'compile' and everything is compiled again!
<p>Any suggestions?
<br>Dan
<pre>--&nbsp;
"Sometimes I wish I could be you, just so I could be friends with me."
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-- Agelica Pickles</pre>
&nbsp;</html>


Mime
View raw message