+++ /dev/null
-<!-- PROPERTIES -->
-
-
-<!-- Default entry point for the build -->
-<target name="all" depends="clean, init, compile, jar" />
-
-<target name="startup" depends="init_directory_properties">
- <property name="module.classpath_id" value="module.build.path" />
- <property name="module.classpath" refid="${module.classpath_id}" />
-
- <path id="module.build.path">
- <fileset dir="${external.lib.dir}">
- <include name="**/*.jar"/>
- </fileset>
- </path>
-
- <path id="module.testbuild.path">
- <fileset dir="${test.lib.dir}">
- <include name="**/*.jar"/>
- </fileset>
- </path>
-
-</target>
-
-<target name="init" depends="import_header,startup">
- <tstamp />
-</target>
-
-<!-- ============================================================================
- Cleanup
- ============================================================================ -->
-
-<target name="ant.deps">
-</target>
-
-<target name="deps" depends="import_header">
- <antcall target="module.build.deps">
- <param name="download.dir" value="${external.lib.dir}"/>
- </antcall>
- <antcall target="test.d">
- <param name="download.dir" value="${test.lib.dir}"/>
- </antcall>
- <antcall target="ant.d">
- <param name="download.dir" value="${ant.downloaded.lib.dir}"/>
- </antcall>
- <antcall target="module.test.deps">
- <param name="download.dir" value="${test.lib.dir}"/>
- </antcall>
-</target>
-
-<target name="clean" depends="init_directory_properties,base-test-clean">
- <delete dir="${module.classes.dir}" />
- <delete dir="${module.testclasses.dir}" />
- <delete dir="${module.testoutput.dir}" />
- <delete dir="${module.jars.dir}" />
- <delete dir="${module.docbase.dir}" />
- <delete dir="${module.report.dir}" />
- <delete dir="${module.sql.dir}" />
- <delete dir="${module.build.dir}"/>
-</target>
-
-<target name="clean-deps" depends="init_directory_properties">
- <delete>
- <fileset dir="${external.lib.dir}" includes="*"/>
- </delete>
- <delete>
- <fileset dir="${test.lib.dir}" includes="*"/>
- </delete>
- <delete>
- <fileset dir="${ant.downloaded.lib.dir}" includes="*"/>
- </delete>
-</target>
-
-<!-- ============================================================================
- Compilation of java code.
- ============================================================================ -->
-
-<!-- Compilation of java code, requires a srcdirs variable to be
- set to a path of one of more directories separated by : or ;
--->
-<target name="compile-impl" depends="init">
- <mkdir dir="${module.classes.dir}" />
- <echo level="info" message="compile ${module.name}, source dirs ${srcdirs}" />
- <javac srcdir="${srcdirs}" source="${javac.source}"
- destdir="${module.classes.dir}" classpath="${module.classpath}"
- debug="${javac.debug}" debuglevel="${javac.debug.level}" />
- <copy todir="${module.classes.dir}">
- <fileset dir="${module.source.dir}" excludes="**/*.java" />
- </copy>
-</target>
-
-<!-- Compilation of regular source code -->
-<target name="compile-src" unless="ejbsource.available" depends="init">
- <antcall target="compile-impl">
- <param name="srcdirs" value="${module.source.dir}"/>
- </antcall>
-</target>
-
-<!-- Compilation of regular source code and generated source code
- for EJBs -->
-<target name="compile-src-ejb" if="ejbsource.available" depends="init">
- <antcall target="compile-impl">
- <param name="srcdirs" value="${module.source.dir}:${module.ejbsource.dir}"/>
- </antcall>
-</target>
-
-<target name="compile" depends="init">
- <available file="${module.ejbsource.dir}" type="dir" property="ejbsource.available"/>
- <antcall target="compile-src"/>
- <antcall target="compile-src-ejb"/>
-</target>
-
-<!-- ============================================================================
- Generating a jar file.
- ============================================================================ -->
-
-<target name="jar" depends="compile">
- <mkdir dir="${module.jars.dir}" />
- <echo level="info" message="jar cdmvbase ${module.name}" />
- <!-- Hack: how to remove the schemas directory from the jar when it does not exist -->
- <mkdir dir="${xmlschemas.dir}" />
- <jar jarfile="${module.jars.dir}/${module.jar.name}"
- compress="${jarcompress}">
- <fileset dir="${module.classes.dir}" />
- <fileset dir="${xmlschemas.dir}" />
- </jar>
-</target>
-
-
-<!-- ============================================================================
- Generate javadoc.
- ============================================================================ -->
-
-<target name="javadoc" depends="init">
- <!-- create javadocs -->
- <javadoc packagenames="*" destdir="${module.javadoc.dir}"
- author="true" version="true" use="true" private="yes"
- windowtitle="Dragon documentation" source="${javac.source}"
- sourcepath="${module.source.dir}"
- classpath="${module.classpath}">
- <arg value="-docfilessubdirs"/>
- <arg value="-overview"/>
- <arg value="${module.source.dir}/overview.html"/>
- </javadoc>
-</target>
-
-<target name="testjavadoc" depends="testclasses">
- <!-- create javadocs -->
- <javadoc packagenames="*" destdir="${module.testjavadoc.dir}"
- author="true" version="true" use="true" private="yes"
- windowtitle="Dragon test documentation" source="${javac.source}"
- sourcepath="${module.test.dir}"
- classpathref="test.classpath">
- </javadoc>
-</target>
-
-<!-- ============================================================================
- Generate javadoc in pdf format
- ============================================================================ -->
-
-<target name="pdfdoc" depends="init">
- <!-- create javadocs -->
- <mkdir dir="${module.pdfdoc.dir}" />
- <javadoc packagenames="*" author="true" version="true" private="yes"
- source="${javac.source}" doclet="com.tarsec.javadoc.pdfdoclet.PDFDoclet"
- docletpathref="pdfdoclet.path"
- classpath="${module.classpath}"
- sourcepath="${module.source.dir}"
- additionalparam="-pdf ${module.pdfdoc.dir}/${module.name}.pdf">
- <!-- fileset dir="${module.source.dir}">
- <include name="**/*.java" />
- </fileset -->
- </javadoc>
- <echo
- message="Unfortuantely, this target will have generated some errors but the pdf will still look fine" />
- <echo>Result is available in ${module.pdfdoc.dir}"</echo>
-</target>
-
-<!-- ============================================================================
- Check javadoc
- ============================================================================ -->
-
-<target name="doccheck" depends="init">
- <mkdir dir="${module.doccheck.dir}" />
- <javadoc packagenames="*" destdir="${module.doccheck.dir}"
- author="true" version="true"
- doclet="com.sun.tools.doclets.doccheck.DocCheck"
- docletpathref="doccheck.path"
- classpath="${module.classpath}"
- sourcepath="${module.source.dir}">
- </javadoc>
- <echo>Results are available in ${module.doccheck.dir}"</echo>
-</target>
-
-<!-- ============================================================================
- Copy build results to a standard location.
- ============================================================================ -->
-
-<target name="clean-dist" depends="clean">
- <delete>
- <fileset dir="${module.dist.dir}" includes="**"/>
- </delete>
-</target>
-
-<target name="dist-lite-product" depends="deps,jar">
- <mkdir dir="${module.dist.dir}"/>
- <delete>
- <fileset dir="${module.dist.dir}" excludes="**/CVS" />
- </delete>
- <copy todir="${module.dist.dir}" flatten="yes">
- <fileset dir="${module.build.dir}">
- <include name="**/*.jar" />
- </fileset>
- <fileset dir="${module.build.dir}">
- <include name="**/*.pdf" />
- </fileset>
- </copy>
- <if>
- <isset property="webroot.dir"/>
- <then>
- <jar destfile="${module.dist.dir}/${module.name}.war"
- basedir="${webroot.dir}"/>
- </then>
- </if>
-</target>
-
-<target name="dist-lite-test" depends="deps,testclasses">
- <jar destfile="${module.dist.dir}/${module.testjar.name}"
- basedir="${module.testclasses.dir}"
- includes="**/*.class"/>
- <jar destfile="${module.dist.dir}/${module.testresourcesjar.name}"
- basedir="${module.testresource.dir}" />
-</target>
-
-<target name="dist-lite" depends="clean,dist-lite-product,dist-lite-test">
- <if>
- <isset property="post-dist-lite"/>
- <then>
- <antcall target="post-dist-lite"/>
- </then>
- </if>
-</target>
-
-<target name="dist-javadoc" depends="javadoc,pdfdoc,testjavadoc">
- <jar destfile="${module.dist.dir}/${module.javadocjar.name}"
- basedir="${module.javadoc.dir}" />
- <jar destfile="${module.dist.dir}/${module.testjavadocjar.name}"
- basedir="${module.testjavadoc.dir}" />
- <copy todir="${module.api.forrest.dir}">
- <fileset dir="${module.javadoc.dir}" />
- </copy>
-</target>
-
-<target name="dist"
- depends="dist-lite,dist-javadoc"
- description="copying compiled sources to dist location and copy documentation to forrest site">
- <echo
- message="Copying build results for ${module.name} to a location where other modules can find it." />
-</target>
-
-<!-- ============================================================================
- Check style,
- ============================================================================ -->
-
-<target name="checkstyle-impl">
- <checkstyle config="${build.dir}/${checkstyle.rules}"
- failOnViolation="false">
- <classpath>
- <pathelement path="${checkstyle.classpath}"/>
- </classpath>
- <fileset dir="${checkstyle.srcdir}" includes="**/*.java"/>
- <formatter type="xml" tofile="${module.checkstyle.dir}/${checkstyle.report}.xml"/>
- </checkstyle>
- <style style="${build.dir}/checkstyle-simple.xsl"
- in="${module.checkstyle.dir}/${checkstyle.report}.xml"
- out="${module.checkstyle.dir}/${checkstyle.report}.html"/>
- <echo>Results are available at ${module.checkstyle.dir}/${checkstyle.report}.html</echo>
-</target>
-
-<target name="checkstyle" depends="testclasses">
- <mkdir dir="${module.checkstyle.dir}"/>
- <antcall target="checkstyle-impl">
- <param name="checkstyle.classpath" refid="module.build.path"/>
- <param name="checkstyle.srcdir" value="${module.source.dir}"/>
- <param name="checkstyle.report" value="source-results"/>
- </antcall>
- <antcall target="checkstyle-impl">
- <param name="checkstyle.classpath" refid="module.testbuild.path"/>
- <param name="checkstyle.srcdir" value="${module.test.dir}"/>
- <param name="checkstyle.report" value="test-results"/>
- </antcall>
-</target>
-
-<!-- ============================================================================
- Formatting source code.
- ============================================================================ -->
-<target name="format" depends="init">
- <jalopy loglevel="INFO" classpathref="module.testbuild.path"
- convention="${jalopy.rules}">
- <fileset dir="${module.source.dir}">
- <include name="**/*.java" />
- </fileset>
- <fileset dir="${module.test.dir}">
- <include name="**/*.java" />
- </fileset>
- </jalopy>
-</target>
-
-<!-- =========================================================================
- Check redundancy in the code
- ========================================================================= -->
-<target name="simian" depends="init">
- <simian threshold="7">
- <fileset dir="${module.source.dir}" includes="**/*.java" />
- </simian>
-</target>
-
-
-<!-- =========================================================================
- Check dependencies using macker.
- ========================================================================= -->
-<property name="macker.file" value="macker.xml" />
-<target name="macker" depends="compile">
- <available file="${macker.file}" property="macker.file.found" />
- <fail message="Macker source file ${macker.file} was not found."
- unless="macker.file.found" />
- <macker>
- <rules dir="." includes="macker.xml" />
- <classes dir="${module.classes.dir}">
- <include name="**/*.class" />
- </classes>
- <classpath>
- <pathelement path="${module.classes.dir}" />
- <path refid="module.build.path" />
- </classpath>
- </macker>
-</target>
-
-
-<!-- ===========================================================================
- JUnit tests.
- =========================================================================== -->
-
-<target name="testclasses" depends="compile">
- <mkdir dir="${module.test.dir}" />
- <mkdir dir="${module.testresource.dir}" />
- <mkdir dir="${module.testclasses.dir}" />
- <path id="test.classpath">
- <pathelement path="${module.classes.dir}" />
- <pathelement path="${module.test.dir}" />
- <path refid="module.testbuild.path" />
- <path refid="module.build.path" />
- </path>
- <javac srcdir="${module.test.dir}"
- destdir="${module.testclasses.dir}"
- debug="${javac.debug}" debuglevel="${javac.debug.level}" compiler="modern"
- source="${javac.source}" failonerror="yes">
- <classpath>
- <path refid="test.classpath"/>
- </classpath>
- </javac>
- <copy todir="${module.testclasses.dir}">
- <fileset dir="${module.test.dir}" excludes="**/*.java" />
- <fileset dir="${module.testresource.dir}" />
- </copy>
-</target>
-
-<!-- test-base is a target mean to be used by other targets.
- It expects one parameter names 'testedclasses' to indicate the directory
- where the compiled test classes reside.
--->
-
-<target name="base-test-clean">
- <delete file="coverage.ec"/>
- <delete file="coverage.em"/>
-</target>
-
-
-<target name="base-test-impl" depends="testclasses">
- <mkdir dir="${module.report.dir}" />
- <antcall target="emma"/>
- <junit haltonfailure="${junit.halt.on.failure}" printsummary="on" dir="." fork="yes" showoutput="yes">
- <batchtest todir="${module.report.dir}">
- <fileset dir="${module.testclasses.dir}">
- <include name="${testclassnames}" />
- <!-- exclude inner classes -->
- <exclude name="**/*$$*.class"/>
- </fileset>
- </batchtest>
- <formatter type="xml" />
- <classpath>
- <path refid="xmlschemas.path" />
- <pathelement path="${module.testclasses.dir}" />
- <pathelement path="${testedclasses}" />
- <pathelement path="${testlibrary}" />
- <pathelement path="${module.classes.dir}" />
- <pathelement path="${log4j.properties.dir}" /><!-- for log4j.properties -->
- <!-- the test resource directory is added to the path as well to make it
- easy to access resources from tests -->
- <pathelement path="${module.testresource.dir}" />
- <path refid="module.testbuild.path" />
- <path refid="module.build.path" />
- </classpath>
- </junit>
-</target>
-
-<target name="base-test-allclasses" unless="test">
- <echo>Testing all classes</echo>
- <antcall target="base-test-impl">
- <param name="testclassnames" value="**/*Test.class" />
- </antcall>
-</target>
-
-<target name="base-test-singleclass" if="test">
- <echo>Testing testcases that conform to the pattern *${test}*</echo>
- <antcall target="base-test-impl">
- <param name="testclassnames" value="**/*${test}*.class" />
- </antcall>
-</target>
-
-<target name="base-test">
- <antcall target="base-test-allclasses" />
- <antcall target="base-test-singleclass" />
-</target>
-
-<!-- Run junit test -->
-
-<target name="test">
- <antcall target="base-test">
- <param name="testedclasses" value="${module.classes.dir}" />
- </antcall>
-</target>
-
-<!-- reporting target used by other targets. This should not depend on
- the test target to avoid unnecessary duplicate runs of the tests -->
-
-<target name="base-reports" depends="init">
- <mkdir dir="${module.report.dir}/html" />
- <mkdir dir="${module.report.dir}/html/unit" />
- <junitreport todir="${module.report.dir}" tofile="${unitreport}">
- <fileset dir="${module.report.dir}">
- <include name="TEST-*.xml" />
- </fileset>
- <report todir="${module.report.dir}/html/unit" />
- </junitreport>
-</target>
-
-<!-- Run junit tests with HTML reporting -->
-
-<target name="junit-reports" depends="test">
- <antcall target="base-reports" />
- <antcall target="emma-reports" />
-</target>
-
-<target name="reports">
- <antcall target="junit-reports">
- <param name="emma.enabled" value="true"/>
- </antcall>
-</target>
-
- <!-- Instrument classes using emma -->
-
- <target name="emma" depends="init_directory_properties">
- <emma enabled="${emma.enabled}">
- <instr instrpath="${module.classes.dir}" mode="overwrite"/>
- </emma>
- </target>
-
- <target name="emma-reports" depends="init_directory_properties" if="emma.enabled">
- <mkdir dir="${module.emmareport.dir}"/>
- <emma enabled="${emma.enabled}" >
- <report sourcepath="${module.source.dir}">
- <!-- collect all EMMA data dumps (metadata and runtime): -->
- <infileset dir="." includes="*.em, *.ec" />
-
- <txt outfile="${module.emmareport.dir}/report.txt"/>
- <html outfile="${module.emmareport.dir}/index.html"/>
- <!-- sourcepath>
- <dirset dir="${src}" >
- <include name="." />
- </dirset>
- </sourcepath -->
- </report>
- </emma>
- </target>
-
-<!-- =======================================================================
- FORREST
- ======================================================================-->
- <target name="forrest" description="runs Forrest">
- <property name="forrest.home" location="${env.FORREST_HOME}" />
- <property name="forrest.ant.home" location="${forrest.home}/tools/ant" />
- <java classname="org.apache.tools.ant.Main" fork="true" failonerror="true" maxmemory="128M">
- <classpath>
- <fileset dir="${forrest.ant.home}/lib">
- <include name="*.jar" />
- </fileset>
- <pathelement path="${java.home}/../lib/tools.jar" />
- </classpath>
- <sysproperty key="ant.home" value="${forrest.ant.home}" />
- <sysproperty key="forrest.home" value="${forrest.home}" />
- <sysproperty key="basedir" value="${basedir}" />
- <sysproperty key="java.endorsed.dirs" value="${forrest.home}/lib/endorsed" />
- <arg line="-f ${forrest.home}/main/forrest.build.xml" />
- </java>
- </target>
-
-<!-- ============================================================================
- Database targets
- ============================================================================ -->
-
-<!-- Runs a main program found in the test source tree.
- Properties:
- - my.test.program: class name of the program to run
- - my.args: arguments to be passed to the program -->
-<target name="runTestProgram" depends="testclasses">
- <java classname="${my.test.program}">
- <arg line="${my.args}"/>
- <classpath>
- <path refid="xmlschemas.path" />
- <path refid="junit.path" />
- <pathelement path="${module.testclasses.dir}" />
- <pathelement path="${testedclasses}" />
- <pathelement path="${testlibrary}" />
- <pathelement path="${module.classes.dir}" />
- <pathelement path="${log4j.properties.dir}" /><!-- for log4j.properties -->
- <!-- the test resource directory is added to the path as well to make it
- easy to access resources from tests -->
- <pathelement path="${module.testresource.dir}" />
- <path refid="module.testbuild.path" />
- <path refid="module.build.path" />
- </classpath>
- </java>
-</target>
-
-<property name="database.starter"
- value="org.wamblee.persistence.test.DatabaseStarter"/>
-<target name="startdb">
- <echo>After the database has started, you must populate the database in some way.
- For instance, using the schemaupdate ant target</echo>
- <antcall target="runTestProgram">
- <param name="my.test.program" value="${database.starter}"/>
- <param name="my.args" value=""/>
- </antcall>
-</target>
-
-<property name="schemaupdater"
- value="org.wamblee.test.HibernateUtils"/>
-<target name="schemaupdate">
- <antcall target="runTestProgram">
- <param name="my.test.program" value="${schemaupdater}"/>
- <param name="my.args" value="${hibernate.filelist}"/>
- </antcall>
-</target>
-
-<target name="schemaexport" depends="init">
- <mkdir dir="${module.sql.dir}" />
- <echo>Generating schema in output file ${module.sql.dir}/hibernate.sql</echo>
- <antcall target="runTestProgram">
- <param name="my.test.program" value="${schemaupdater}"/>
- <param name="my.args" value="-export ${module.sql.dir}/hibernate.sql ${hibernate.filelist}"/>
- </antcall>
-</target>
-
-<!-- INCLUDED MARKER -->
-<property name="build_trailer_included" value="true" />
-
-