<?xml version="1.0"?> <!-- REBUILD.XML simple holidays 4.7 build that presumes all files are already in the project directory. --> <!-- Build with ant -f rebuild.xml zip jet --> <!-- Compile and jar holidays using ANT --> <!-- Invoke with [ant clean] to erase class files and start over. --> <!-- Invoke with [ant compile] to just compile. --> <!-- Invoke with [ant javadoc] to generate javadoc. --> <!-- Invoke with [ant jar] to compile and create jar files. --> <!-- Invoke with [ant jet] to create JET executables. --> <!-- Invoke with [ant zip] to create source code zip files. --> <!-- For details of ANT use, see http://mindprod.com/jgloss/ant.html --> <!-- D E F I N I T I O N S --> <!-- ANT.project.dir is com/mindprod/holidays --> <!-- basedir is E:/ --> <project name="holidays" basedir="E:/" default="jar"> <!-- extensions for zip. Case sensitive! --> <property name="distributed.exts" value="**/*.au,**/*.asm,**/*.bat,**/*.btm,**/*.c,**/*.class,**/*.cpp,**/*.css,**/*.csv,**/*.dll,**/*.gif,**/*.h,**/*.hpp,**/*.htm,**/*.html,**/*.ico,**/*.ION,**/*.ion,**/*.jar,**/*.java,**/*.jnlp,**/*.jpg,**/*.look,**/*.png,**/*.properties,**/*.ser,**/*.sln,**/*.txt,**/*.use,**/*.vcxproj,**/*.xml" /> <!-- dirs we to exclude from zip. Case sensitive! --> <property name="nondistributed" value="**/jetpdb/**,**/Debug/**,**/Release/**" /> <!-- C L E A N --> <target name="clean"> <echo message=" ::: holidays ::: deleting files to force regeneration." /> <delete> <fileset dir="com/mindprod/holidays" includes="**/*.class" /> <fileset dir="com/mindprod/holidays" includes="**/*.jar" /> <!-- leave Jet *.exe. Old versions are still useful during the build. --> <fileset dir="com/mindprod/holidays" includes="holidays47.zip" /> </delete> </target> <!-- C O M P I L E --> <target name="compile"> <echo message=" ::: holidays ::: compiling Java tree with target=1.5" /> <javac source="1.5" target="1.5" srcdir="com/mindprod/holidays" sourcepath="${basedir}" classpath="${basedir}" debug="on" includeAntRuntime="false"> <compilerarg value="-Xlint:unchecked" /> <compilerarg value="-Xlint:fallthrough" /> <compilerarg value="-Xlint:deprecation" /> </javac> </target> <!-- J A V A H --> <target name="javah" depends="compile"> <!-- there is no jni --> </target> <!-- G A T H E R --> <target name="gather" depends="compile"> <!-- nothing to do for non-distributed build --> </target> <!-- J A R --> <!-- Make apache-ant-1.8.1\lib\GenJar.jar known to ANT --> <!-- See http://mindprod.com/jgloss/genjar.html for details --> <taskdef resource="genjar.properties" /> <target name="jar" depends="gather"> <echo message=" ::: holidays ::: genjar finding dependencies and creating jar." /> <genjar jarfile="com/mindprod/holidays/holidays.jar"> <!-- include main class and all its dependencies --> <class name="com.mindprod.holidays.Holidays" /> <!-- Extra classes and properties to include in holidays.jar --> <!-- include all the dynamically loaded classes in com.mindprod.holidays dir --> <class> <fileset dir="${basedir}"> <include name="com/mindprod/holidays/*.class" /> </fileset> </class> <!-- include a properties file as a resource --> <resource file="com/mindprod/holidays/Holiday.properties" package="com.mindprod.holidays" /> <!-- define the manifest --> <manifest> <attribute name="Main-Class" value="com.mindprod.holidays.Holidays" /> </manifest> </genjar> <!-- S I G N --> <!-- get _your_ password from set jarsignerpassword=sesame --> <!-- get _your_ code-signing certificate from set cert=mindprodcert2012dsa --> <property environment="env" /> <signjar jar="com/mindprod/holidays/holidays.jar" alias="${env.cert}" keystore="${env.keystore}/.keystore" storepass="${env.jarsignerpassword}" /> <!-- bundle public key of code signing certificate for zip. --> <copy file="E:/mindprod/applet/${env.cert}.cer" todir="com/mindprod/holidays" failonerror="true" overwrite="true" /> <!-- build exportholidaystocsv.jar --> <genjar jarfile="com/mindprod/holidays/exportholidaystocsv.jar"> <class name="com.mindprod.holidays.ExportHolidaysToCSV" /> <!-- Extra classes and properties to include in exportholidaystocsv.jar --> <!-- include all the dynamically loaded classes in com.mindprod.holidays dir --> <class> <fileset dir="${basedir}"> <include name="com/mindprod/holidays/*.class" /> </fileset> </class> <!-- include a properties file as a resource --> <resource file="com/mindprod/holidays/Holiday.properties" package="com.mindprod.holidays" /> <!-- define the manifest --> <manifest> <attribute name="Main-Class" value="com.mindprod.holidays.ExportHolidaysToCSV" /> </manifest> </genjar> <!-- build exportholidaystohtml.jar --> <genjar jarfile="com/mindprod/holidays/exportholidaystohtml.jar"> <class name="com.mindprod.holidays.ExportHolidaysToHTML" /> <!-- Extra classes and properties to include in exportholidaystohtml.jar --> <!-- include all the dynamically loaded classes in com.mindprod.holidays dir --> <class> <fileset dir="${basedir}"> <include name="com/mindprod/holidays/*.class" /> </fileset> </class> <!-- include a properties file as a resource --> <resource file="com/mindprod/holidays/Holiday.properties" package="com.mindprod.holidays" /> <!-- define the manifest --> <manifest> <attribute name="Main-Class" value="com.mindprod.holidays.ExportHolidaysToHTML" /> </manifest> </genjar> </target> <!-- P O S T J A R --> <target name="postjar" depends="jar"> <!-- nothing to do --> </target> <!-- P R E J E T --> <target name="prejet"> <echo message=" ::: holidays ::: avoid regenerating Jet executable if already done." /> <uptodate property="jet.uptodate" srcfile="com/mindprod/holidays/holidays.jar" targetfile="com/mindprod/holidays/holidays.exe" /> </target> <!-- J E T --> <!-- Requires Excelsior JET native Java compiler jc.exe on the path --> <!-- See http://mindprod.com/jgloss/jet.html for details --> <target name="jet" depends="prejet" unless="jet.uptodate"> <echo message=" ::: holidays ::: jet compiling." /> <exec executable="jc.exe" dir="com/mindprod/holidays"> <arg value="-DECOR=" /> <arg value="holidays.jar" /> </exec> <echo message=" ::: holidays/ExportHolidaysToCSV ::: jet compiling" /> <exec executable="jc.exe" dir="com/mindprod/holidays"> <arg value="-DECOR=" /> <arg value="exportholidaystocsv.jar" /> </exec> <echo message=" ::: holidays/ExportHolidaysToHTML ::: jet compiling" /> <exec executable="jc.exe" dir="com/mindprod/holidays"> <arg value="-DECOR=" /> <arg value="exportholidaystohtml.jar" /> </exec> </target> <!-- P R E J A V A D O C . --> <target name="prejavadoc"> <echo message=" ::: holidays ::: avoid regenerating Javadoc if already done." /> <uptodate property="javadoc.uptodate" targetfile="com/mindprod/holidays/javadoc/index.html"> <srcfiles dir="com/mindprod/holidays" includes="**/*.java" /> </uptodate> </target> <!-- J A V A D O C --> <target name="javadoc" depends="prejavadoc" unless="javadoc.uptodate"> <echo message=" ::: holidays ::: generating Javadoc." /> <!-- prepare javadoc --> <javadoc author="true" destdir="com/mindprod/holidays/javadoc" packagenames="com.mindprod.holidays.*" sourcepath="E:/" use="true" access="package" version="true" /> </target> <!-- Z I P --> <target name="zip" depends="javadoc,jar"> <echo message=" ::: holidays ::: preparing zip distributable." /> <!-- Remove references to separate foot files. --> <exec executable="prunefoot.exe" failifexecutionfails="false" dir="com/mindprod/holidays"> <arg value="holidays.html" /> <arg value="holidays.manual.html" /> </exec> <zip destfile="com/mindprod/holidays/holidays47.zip" duplicate="preserve" filesonly="true" includes="${distributed.exts}" excludes="${nondistributed}"> <!-- zipfileset includes all subdirs as well --> <zipfileset dir="com/mindprod/holidays" prefix="com/mindprod/holidays" includes="${distributed.exts}" excludes="${nondistributed}" /> <!-- Extra classes and properties to include in the Zip --> <zipfileset dir="com/mindprod/common11" prefix="com/mindprod/common11" includes="${distributed.exts}" excludes="${nondistributed}" /> <zipfileset dir="com/mindprod/common13" prefix="com/mindprod/common13" includes="${distributed.exts}" excludes="${nondistributed}" /> <zipfileset dir="com/mindprod/common15" prefix="com/mindprod/common15" includes="${distributed.exts}" excludes="${nondistributed}" /> <zipfileset dir="com/mindprod/csv" prefix="com/mindprod/csv" includes="${distributed.exts}" excludes="${nondistributed}" /> <zipfileset dir="com/mindprod/entities" prefix="com/mindprod/entities" includes="${distributed.exts}" excludes="${nondistributed}" /> <zipfileset dir="com/mindprod/fastcat" prefix="com/mindprod/fastcat" includes="${distributed.exts}" excludes="${nondistributed}" /> </zip> </target> <!-- P O S T Z I P --> <target name="postzip" depends="zip,postjar"> <!-- not distributing a zip --> </target> </project>