-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
107 lines (95 loc) · 3.95 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
<project name="sax" default="default" xmlns:if="ant:if">
<property name="build.sysclasspath" value="ignore"/>
<property file="build.properties"/>
<property name="description" value="BFO Json API"/>
<property name="dist" value="dist"/> <!-- where to build the Jars -->
<property name="classes.main" value="build/main"/> <!-- where to compile the classes -->
<property name="docs" value="docs"/>
<property name="src.main" value="src/main"/>
<property name="jar.main" value="${dist}/bfosax-${version}.jar"/>
<property name="classes.test" value="build/test"/> <!-- where to compile the classes -->
<property name="src.test" value="src/test"/>
<property name="jar.test" value="${dist}/bfosax-test-${version}.jar"/>
<path id="path.build">
<fileset dir="lib" includes="*.jar"/>
</path>
<target name="clean">
<delete dir="${classes.main}" />
<delete dir="${classes.test}" />
<delete dir="${dist}" />
<delete dir="${docs}" />
</target>
<target name="build">
<mkdir dir="${classes.main}"/>
<mkdir dir="${dist}"/>
<javac encoding="utf-8" debug="true" source="8" target="8" destdir="${classes.main}">
<src path="${src.main}"/>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:rawtypes"/>
<compilerarg value="-Xlint:deprecation"/>
<compilerarg value="-Xlint:finally"/>
<compilerarg value="-Xlint:overrides"/>
<classpath refid="path.build" />
</javac>
<copy todir="${classes.main}">
<fileset dir="${src.main}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${jar.main}" update="false">
<fileset dir="${classes.main}" />
</jar>
<mkdir dir="${classes.test}"/>
<javac encoding="utf-8" debug="true" source="8" target="8" destdir="${classes.test}">
<src path="${src.test}"/>
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:deprecation"/>
<classpath>
<pathelement location="${jar.main}"/>
<path refid="path.build"/>
</classpath>
</javac>
<copy todir="${classes.test}">
<fileset dir="${src.test}">
<exclude name="**/*.java"/>
</fileset>
</copy>
<jar jarfile="${jar.test}" update="false">
<fileset dir="${classes.test}" />
</jar>
</target>
<target name="javadoc">
<mkdir dir="${docs}"/>
<condition property="javadoc.additionalparam" value="-notimestamp"><matches pattern="^1.8" string="${java.version}"/></condition>
<property name="javadoc.additionalparam" value="-notimestamp --ignore-source-errors"/>
<javadoc destdir="${docs}" access="public" author="false" version="false" windowtitle="${description} ${version}" charset="UTF-8" encoding="UTF-8" docencoding="UTF-8" additionalparam="${javadoc.additionalparam}" use="true" breakiterator="true">
<sourcefiles>
<fileset dir="${src.main}"/>
</sourcefiles>
<doctitle><![CDATA[${description} ${version}]]></doctitle>
<header><![CDATA[${description} ${version}]]></header>
<link href="https://docs.oracle.com/javase/8/docs/api/"/>
</javadoc>
</target>
<target name="test" depends="build">
<java classname="com.bfo.sax.Test" fork="true">
<jvmarg value="-ea"/>
<classpath>
<pathelement location="${jar.main}"/>
<pathelement location="${jar.test}"/>
<path refid="path.build"/>
</classpath>
<arg value="--both"/>
<arg value="--dtd" if:true="${dtd}"/>
<arg value="--decl" if:true="${decl}"/>
<arg value="--entity" if:true="${entity}"/>
<arg value="--quiet" if:true="${quiet}"/>
<arg value="--threads" if:true="${threads}"/>
<arg value="--cache" if:true="${cache}"/>
<arg value="--nocache" if:true="${nocache}"/>
<arg value="--cache-publicid" if:true="${cache-publicid}"/>
<arg value="--nocache-publicid" if:true="${nocache-publicid}"/>
</java>
</target>
<target name="default" depends="test,javadoc"></target>
</project>