-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
123 lines (110 loc) · 3.71 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0"?>
<project name="verveine.extractor.java" default="jar" basedir=".">
<!-- Sets variables which can later be used. -->
<!-- The value of a property is accessed via ${} -->
<property name="src.dir" location="src" />
<property name="gensrc.dir" location="gen" />
<property name="testsrc.dir" location="tests" />
<property name="build.dir" location="bin" />
<property name="docs.dir" location="docs" />
<property name="dist.dir" location="lib" />
<property name="verveine.jar" location="${dist.dir}/verveine.extractor.java.jar" />
<property name="tests.jar" location="${dist.dir}/verveine.extractor.java.tests.jar" />
<property name="test.report.dir" location="testrep" />
<!-- Deletes the existing build, docs and dist directory-->
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${docs.dir}" />
<delete file="${verveine.jar}" />
</target>
<!-- Re-creates the build, docs and dist directory-->
<target name="makedir">
<mkdir dir="${build.dir}" />
<mkdir dir="${docs.dir}" />
<mkdir dir="${test.report.dir}" />
</target>
<target name="compile" depends="clean, makedir">
<javac srcdir="${gensrc.dir}" destdir="${build.dir}" source="17" target="17" includeantruntime="false" debug="true" debuglevel="lines,vars,source">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
<javac srcdir="${src.dir}" destdir="${build.dir}" source="17" target="17" includeantruntime="false" debug="true" debuglevel="lines,vars,source">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
<javac srcdir="${testsrc.dir}" destdir="${build.dir}" includeantruntime="false" debug="true" debuglevel="lines,vars,source">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<!-- Creates Javadoc -->
<target name="docs" depends="compile,jar">
<javadoc sourcepath="${src.dir}" destdir="${docs.dir}">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
<!--Creates the deployable jar file -->
<target name="jar" depends="compile">
<jar destfile="${verveine.jar}"
basedir="${build.dir}"
includes="**/*.class"
/>
</target>
<!--Creates the deployable jar file -->
<target name="rebuild">
<jar destfile="${verveine.jar}"
basedir="${build.dir}"
includes="**/*.class"
/>
</target>
<!-- Run the JUnit Tests -->
<target name="junit" depends="jar">
<junit fork="false" haltonfailure="true" haltonerror="true">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
<formatter type="xml"/>
<formatter type="plain" usefile="false" />
<batchtest fork="yes" todir="${test.report.dir}">
<fileset dir="${testsrc.dir}">
<include name="**/*.java"/>
<exclude name="**/*VerveineJTest_Basic.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- Run the JUnit Tests even in case of errors -->
<target name="junit_all" depends="jar">
<junit printsummary="on" fork="true" haltonfailure="off" haltonerror="off">
<classpath>
<fileset dir="${dist.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
<formatter type="xml" />
<batchtest fork="yes" todir="${test.report.dir}">
<fileset dir="${testsrc.dir}">
<include name="**/*.java"/>
<exclude name="**/*VerveineJTest_Basic.java"/>
</fileset>
</batchtest>
</junit>
</target>
<!-- synonym -->
<target name="test" depends="junit"/>
</project>