Project

General

Profile

« Previous | Next » 

Revision 2317

Added by Matt Jones over 20 years ago

Added dependency check to see if the httpclient.jar and utilities.jar are
already present in lib. If they are, building utilities is skipped. This
allows us to ship a distribution with just the jar files rather than the
source from the utilities module and still have the compile work. Now
the "clean" target no loger removes these jars from lib -- to remove them
and start really fresh you need to run the fullclean target. This is so that
people building from the release can run clean without deleting the required
jar files from lib.

View differences:

build.xml
288 288
      <property name="ver.src" value="${ver.dir}/src"/>
289 289

  
290 290
      <property name="package.home" value="edu/ucsb/nceas/metacat" />
291
      <condition property="utilities.required">
292
        <or>
293
          <not><available file="lib/httpclient.jar"/></not>
294
          <not><available file="lib/utilities.jar"/></not>
295
        </or>
296
      </condition>
291 297
   </target>
292 298

  
293 299
   <target name="prepare" depends="init">
......
335 341
            includes="**/protocols/" />
336 342
   </target>
337 343

  
338
   <target name="utilities" depends="config">
344
   <target name="utilities" depends="config" if="utilities.required">
339 345
     <ant dir="${utilitiesdir}" target="clean" inheritAll="false" />
340 346
     <ant dir="${utilitiesdir}" target="jar" inheritAll="false" />
341 347
     <copy file="${utilitiesdir}/lib/httpclient.jar" todir="lib" />
......
819 825
   <target name="clean" depends="init"
820 826
            description="deletes build dir and any files copied to cvs sandbox by build process (jars, xsl) Currently *not* schema/DTDs">
821 827
       <delete dir="${build.dir}" />
822
       <delete file="lib/httpclient.jar" />
823
       <delete file="lib/utilities.jar" />
824 828
       <delete includeEmptyDirs="true" failonerror="false">
825 829
         <fileset dir="${style-common-cvsrelpath}">
826 830
           <include name="${eml-css}" />
......
830 834
     </delete>
831 835
   </target>
832 836

  
837
   <target name="fullclean" depends="clean"
838
            description="deletes even jars that depend on external sources">
839
       <delete file="lib/httpclient.jar" />
840
       <delete file="lib/utilities.jar" />
841
   </target>
842

  
833 843
   <target name="jdoc" depends="prepare"
834 844
            description="generates javadoc documentation">
835 845
       <javadoc packagenames="edu.ucsb.nceas.*"
......
844 854
       />
845 855
   </target>
846 856

  
847
   <target name="dist" depends="jar,protocol,jdoc,geteml"
857
   <target name="dist" depends="geteml,jar,protocol,jdoc"
848 858
            description="prepares a full release distribution">
849 859
      <mkdir dir="${dist.dir}"/>
850 860
      <delete dir="${ver.dir}" />
......
854 864
            excludes="**/CVS* **/.#* **/src* **/test* **/build* **/docs* ${dist.dir}"/>
855 865
      </copy>
856 866
      <copy todir="${ver.dir}" file="build.xml"/>
857
      <copy todir="${ver.dir}/lib" file="${build.dir}/metacat.jar"/>
858
      <copy todir="${ver.dir}/lib" file="${build.dir}/protocol.jar"/>
867
      <copy todir="${ver.dir}" file="build.properties"/>
859 868

  
860 869
      <copy todir="${ver.dir}/docs" filtering="yes">
861 870
        <fileset dir="docs" excludes="**/*gif **/*jpg **/*png" />

Also available in: Unified diff