forked from egonw/cheminfbenchmark
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
99 lines (99 loc) · 4.31 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="UTF-8"?>
<project name="Cheminformatics Benchmark" default="compile" basedir=".">
<!-- properties -->
<property name="full-name" value="Cheminformatics Benchmark" />
<property name="unix-name" value="benchmark" />
<property name="version" value="0.1.0" />
<property name="source.dir" location="src" />
<property name="resource.dir" location="resource" />
<property name="lib.dir" location="lib" />
<property name="build.dir" location="build" />
<property name="class.dir" location="${build.dir}/classes" />
<property name="jar.dir" location="${build.dir}/jar" />
<property name="tgz.dir" location="${build.dir}/tgz" />
<property name="doc.dir" location="${build.dir}/doc" />
<property name="dist.dir" location="${build.dir}/dist" />
<property name="test.dir" location="${build.dir}/test" />
<property name="reports.dir" location="${build.dir}/reports" />
<property name="lib-licenses.file" location="${lib.dir}/LICENSES.txt" />
<property name="license.file" location="LICENSE.txt" />
<property name="junit.lib" value="${lib.dir}/junit-4.5.jar" />
<property name="test.class" value = "net.openmolecules.benchmark.test.Main" />
<property name="config" value="mx-cdk-sdf.xml"/>
<!-- filesets -->
<fileset dir="${lib.dir}" id="libs">
<include name="**/*.jar" />
</fileset>
<!-- targets -->
<target name="init" description="Create build directories." >
<mkdir dir="${build.dir}" />
<mkdir dir="${class.dir}" />
<mkdir dir="${jar.dir}" />
<mkdir dir="${doc.dir}" />
<mkdir dir="${tgz.dir}" />
<mkdir dir="${test.dir}" />
</target>
<target name="clean" description="Remove build directories.">
<delete dir="${build.dir}" />
<delete dir="${doc.dir}" />
</target>
<target name="compile" depends="init" description="Compile sources.">
<javac srcdir="${source.dir}" destdir="${class.dir}" includes="net/openmolecules/benchmark/**/*.java" debug="on" source="1.5" target="1.5">
<classpath>
<fileset refid="libs" />
</classpath>
</javac>
</target>
<target name="test" depends="compile" description="Run JUnit tests.">
<java classname="${test.class}" fork = "true" dir="${build.dir}">
<classpath>
<pathelement path="${class.dir}" />
<fileset refid="libs" />
</classpath>
</java>
</target>
<target name="doc" depends="compile" description="Create Java Doc.">
<javadoc sourcepath="${source.dir}" packagenames="*" destdir="${doc.dir}" windowtitle="${full-name} API" excludepackagenames="net.openmolecules.benchmark.test">
<doctitle>${full-name} v${version}</doctitle>
<header>${full-name} v${version}</header>
<classpath>
<fileset refid="libs" />
</classpath>
<bottom><![CDATA[<i>Copyright © 2009 <a href="http://metamolecular.com">Metamolecular, LLC</a>. All Rights Reserved.</i>]]>
</bottom>
</javadoc>
</target>
<target name="jar" depends="compile" description="Create the jarfile.">
<jar jarfile="${jar.dir}/${unix-name}-${version}.jar" basedir="${class.dir}" excludes="net/openmolecules/benchmark/test/**" >
</jar>
</target>
<target name="dist" depends="init,compile,doc" description="Create the source distribution.">
<mkdir dir="${dist.dir}/lib" />
<mkdir dir="${dist.dir}/src" />
<mkdir dir="${dist.dir}/doc" />
<copy file="${junit.lib}" todir="${dist.dir}/lib" />
<copy file="${lib-licenses.file}" todir="${dist.dir}/lib" />
<copy file="${license.file}" todir="${dist.dir}" />
<copy todir="${dist.dir}/src">
<fileset dir="${source.dir}" includes="net/openmolecules/benchmark/**/*.java" />
</copy>
<copy todir="${dist.dir}/doc">
<fileset dir="${doc.dir}" />
</copy>
<copy file="build.xml" todir="${dist.dir}" />
</target>
<target name="tgz" depends="dist" description="Create a compressed distribution tarfile.">
<tar destfile="${tgz.dir}/${unix-name}-${version}-src.tar.gz" compression="gzip">
<tarfileset dir="${dist.dir}" prefix="${unix-name}-${version}-src">
</tarfileset>
</tar>
</target>
<target name="run" depends="dist" description="Run the benchmarks and create reports.">
<java fork="true" classname="com.sun.japex.Japex">
<classpath>
<fileset refid="libs" />
</classpath>
<arg line="${config}/"/>
</java>
</target>
</project>