<?xml version="1.0" encoding="ISO-8859-1"?> <project name="laf-widget" default="all"> <!-- Compiler options --> <property name="compiler.debug" value="on" /> <property name="compiler.generate.no.warnings" value="off" /> <property name="compiler.args" value="" /> <property name="compiler.max.memory" value="128m" /> <patternset id="compiler.excluded" /> <patternset id="compiler.resources"> <include name="**/?*.properties" /> <include name="**/?*.xml" /> <include name="**/?*.gif" /> <include name="**/?*.png" /> <include name="**/?*.jpeg" /> <include name="**/?*.jpg" /> <include name="**/?*.html" /> <include name="**/?*.dtd" /> <include name="**/?*.license" /> <include name="**/?*.tld" /> <include name="**/?*.ttf" /> </patternset> <!-- JDK definitions --> <!-- Project Libraries --> <!-- Global Libraries --> <dirname property="module.laf-widget.basedir" file="${ant.file}" /> <property name="compiler.args.laf-widget" value="${compiler.args}" /> <property name="laf-widget.build.dir" value="${module.laf-widget.basedir}/build/" /> <property name="laf-widget.output.dir" value="${laf-widget.build.dir}/classes" /> <property name="laf-widget.drop.dir" value="${module.laf-widget.basedir}/drop" /> <property name="laf-widget.lib.dir" value="${module.laf-widget.basedir}/lib" /> <property name="laf-widget.src.dir" value="${module.laf-widget.basedir}/src/" /> <property name="laf-widget.version" value="3.3final Goldenrod" /> <path id="laf-widget.module.bootclasspath"> <!-- Paths to be included in compilation bootclasspath --> </path> <path id="laf-widget.module.classpath"> <pathelement location="${laf-widget.lib.dir}/asm-2.2.2.jar" /> <pathelement location="${laf-widget.lib.dir}/asm-commons-2.2.2.jar" /> <pathelement location="${laf-widget.lib.dir}/ant.jar" /> </path> <patternset id="excluded.from.module.laf-widget" /> <patternset id="excluded.from.compilation.laf-widget"> <patternset refid="excluded.from.module.laf-widget" /> <patternset refid="compiler.excluded" /> </patternset> <path id="laf-widget.module.sourcepath"> <dirset dir="${laf-widget.src.dir}"> <include name="org/jvnet/lafwidget" /> <include name="contrib" /> </dirset> </path> <path id="laf-widget.module.testsourcepath"> <dirset dir="${laf-widget.src.dir}"> <include name="test" /> </dirset> </path> <target name="compile.module.laf-widget" depends="compile.module.laf-widget.production, compile.module.laf-widget.tests" description="compile module laf-widget" /> <target name="compile.module.laf-widget.production" description="compile module laf-widget production classes"> <mkdir dir="${laf-widget.output.dir}" /> <javac destdir="${laf-widget.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true"> <compilerarg line="${compiler.args.laf-widget}" /> <bootclasspath refid="laf-widget.module.bootclasspath" /> <classpath refid="laf-widget.module.classpath" /> <src refid="laf-widget.module.sourcepath" /> <patternset refid="excluded.from.compilation.laf-widget" /> </javac> <copy todir="${laf-widget.output.dir}"> <fileset dir="${laf-widget.src.dir}"> <patternset refid="compiler.resources" /> <type type="file" /> <patternset refid="excluded.from.compilation.laf-widget" /> </fileset> </copy> </target> <target name="compile.module.laf-widget.tests" description="compile module laf-widget test classes" unless="skip.tests"> <mkdir dir="${laf-widget.output.dir}" /> <javac destdir="${laf-widget.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memoryMaximumSize="${compiler.max.memory}" fork="true"> <compilerarg line="${compiler.args.laf-widget}" /> <bootclasspath refid="laf-widget.module.bootclasspath" /> <classpath refid="laf-widget.module.classpath" /> <src refid="laf-widget.module.testsourcepath" /> <patternset refid="excluded.from.compilation.laf-widget" /> </javac> <copy todir="${laf-widget.output.dir}/test"> <fileset dir="${laf-widget.output.dir}/test"> <patternset refid="compiler.resources" /> <type type="file" /> <patternset refid="excluded.from.compilation.laf-widget" /> </fileset> </copy> </target> <target name="clean.module.laf-widget" description="cleanup module"> <delete dir="${laf-widget.output.dir}" /> </target> <target name="init" description="Build initialization"> <!-- Perform any build initialization in this target --> </target> <target name="jar-bin" description="create runtime jar"> <mkdir dir="${laf-widget.drop.dir}" /> <delete file="${laf-widget.drop.dir}/laf-widget.jar" /> <jar compress="true" destfile="${laf-widget.drop.dir}/laf-widget.jar"> <fileset dir="${laf-widget.output.dir}/" excludes="test/**,contrib/com/blogofbug/examples/**" /> <fileset dir="${module.laf-widget.basedir}/" includes="resources/**" /> <manifest> <attribute name="Laf-Widget-Version" value="${laf-widget.version}" /> <attribute name="Laf-Widget-BuildStamp" value="${build.time}" /> </manifest> </jar> </target> <target name="jar-bin-tst" description="create test runtime jar"> <delete file="${laf-widget.drop.dir}/laf-widget-tst.jar" /> <jar destfile="${laf-widget.drop.dir}/laf-widget-tst.jar"> <fileset dir="${laf-widget.output.dir}/" includes="test/**" /> <manifest> <attribute name="Laf-Widget-Version" value="${laf-widget.version}" /> <attribute name="Laf-Widget-BuildStamp" value="${build.time}" /> </manifest> </jar> </target> <target name="distro" description="create distribution"> <delete file="${module.laf-widget.basedir}/laf-widget-all.zip" /> <zip destfile="${module.laf-widget.basedir}/laf-widget-all.zip" compress="true"> <fileset dir="${module.laf-widget.basedir}"> <include name="3rd/*.bat" /> <include name="lib/**" /> <include name="src/**" /> <include name="build*.xml" /> <include name="www/index.html" /> <include name="www/docs/**" /> <include name="www/images/**" /> <!-- <include name="docs/**" /> <include name="www/release-info/3.2/**" /> --> </fileset> </zip> </target> <target name="timestamp"> <tstamp> <format property="build.time" pattern="MMMM d, yyyy hh:mm:ss z" /> </tstamp> <echo message="Beginning build: ${build.time}" /> <echo message="Java home: ${java.home}" /> <echo message="Java version: ${ant.java.version}" /> <echo message="Ant version: ${ant.version}" /> </target> <target name="jar" depends="jar-bin, jar-bin-tst" description="create all jars" /> <target name="clean" depends="clean.module.laf-widget" description="cleanup all" /> <target name="all" depends="timestamp, init, clean, compile.module.laf-widget, jar" description="build all" /> </project>