ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob van Oostrum <rvanoost...@ezgov.com>
Subject Re: Another Neophyte Question
Date Tue, 26 Jun 2001 13:39:35 GMT
check the thread on the same subject (DTD and always compiling) ... make sure
your srcdir is where your package tree begins (and that it doesn't contains
something like a src directory that contains the top level package dir)

Jerry Odenwelder wrote:

> Ok, so I have Ant doing my builds and it works correctly :-) - But it always
> compiles all of by java files whether they need it or not.  I've tried and
> tried to make the uptodate task work but it either never compiles or always
> compiles.  Here's is my latest (failed) attempt.
>
> ...
> <patternset id="cleanup.files">
>    <include name="*.class"/>
> </patternset>
>
> ...
>    <target name="buildFiles" if="build.required">
>       <javac srcdir="."
>              destdir="${outputDir}"
>              includes="*.java">
>          <classpath refid="classpath" />
>       </javac>
>    </target>
>
> <!--
>     Build Target
> -->
>    <target name="build" depends="init">
>       <echo> Output Directory is ${outputDir} </echo>
>
>       <!-- Check to see if files are uptodate -->
>       <uptodate property="build.required">
>             <srcfiles dir="${outputDir}">
>                <patternset refid="cleanup.files"/>
>             </srcfiles>
>             <mapper type="merge" to="*.class"/>
>       </uptodate>
>
>      <!-- Try to build -->
>       <antcall target="buildFiles"/>
>
> ...
>
>    </target>
>
> I know I'm not doing something right.  I've tried several combinations, at
> least this one always builds.
>
> Thanks in advance for your help.
>
> Jerry


Mime
View raw message