jadb/module_jadb.xml

103 lines
3.9 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="module_jadb" default="compile.module.jadb">
<dirname property="module.jadb.basedir" file="${ant.file.module_jadb}"/>
<property name="module.jdk.home.jadb" value="${project.jdk.home}"/>
<property name="module.jdk.bin.jadb" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.jadb" value="${project.jdk.classpath}"/>
<property name="compiler.args.jadb" value="-encoding UTF-8 -source 1.6 -target 1.6 ${compiler.args}"/>
<property name="jadb.output.dir" value="${module.jadb.basedir}/bin"/>
<property name="jadb.testoutput.dir" value="${module.jadb.basedir}/bin"/>
<path id="jadb.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="jadb.module.production.classpath">
<path refid="${module.jdk.classpath.jadb}"/>
<path refid="library.junit-4.10.classpath"/>
</path>
<path id="jadb.runtime.production.module.classpath">
<pathelement location="${jadb.output.dir}"/>
<path refid="library.junit-4.10.classpath"/>
</path>
<path id="jadb.module.classpath">
<pathelement location="${jadb.output.dir}"/>
<path refid="${module.jdk.classpath.jadb}"/>
<path refid="library.junit-4.10.classpath"/>
</path>
<path id="jadb.runtime.module.classpath">
<pathelement location="${jadb.output.dir}"/>
<path refid="library.junit-4.10.classpath"/>
</path>
<patternset id="excluded.from.module.jadb">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.jadb">
<patternset refid="excluded.from.module.jadb"/>
</patternset>
<path id="jadb.module.sourcepath">
<dirset dir="${module.jadb.basedir}">
<include name="src"/>
</dirset>
</path>
<path id="jadb.module.test.sourcepath">
<dirset dir="${module.jadb.basedir}">
<include name="test"/>
</dirset>
</path>
<target name="compile.module.jadb" depends="compile.module.jadb.production,compile.module.jadb.tests" description="Compile module jadb"/>
<target name="compile.module.jadb.production" description="Compile module jadb; production classes">
<mkdir dir="${jadb.output.dir}"/>
<javac destdir="${jadb.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.jadb}/javac">
<compilerarg line="${compiler.args.jadb}"/>
<bootclasspath refid="jadb.module.bootclasspath"/>
<classpath refid="jadb.module.production.classpath"/>
<src refid="jadb.module.sourcepath"/>
<patternset refid="excluded.from.compilation.jadb"/>
</javac>
<copy todir="${jadb.output.dir}">
<fileset dir="${module.jadb.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.jadb.tests" depends="compile.module.jadb.production" description="compile module jadb; test classes" unless="skip.tests">
<mkdir dir="${jadb.testoutput.dir}"/>
<javac destdir="${jadb.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.jadb}/javac">
<compilerarg line="${compiler.args.jadb}"/>
<bootclasspath refid="jadb.module.bootclasspath"/>
<classpath refid="jadb.module.classpath"/>
<src refid="jadb.module.test.sourcepath"/>
<patternset refid="excluded.from.compilation.jadb"/>
</javac>
<copy todir="${jadb.testoutput.dir}">
<fileset dir="${module.jadb.basedir}/test">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="clean.module.jadb" description="cleanup module">
<delete dir="${jadb.output.dir}"/>
<delete dir="${jadb.testoutput.dir}"/>
</target>
</project>