ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jerry Odenwelder <Jerry.Odenwel...@Mentisys.com>
Subject Another Neophyte Question
Date Tue, 26 Jun 2001 13:24:20 GMT
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