This repository has been archived by the owner on Apr 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
138 lines (120 loc) · 5.29 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<project name="jejdb" default="build.and.test">
<property file="build.properties"/>
<target name="compile.production" depends="init" description="Compile module JEJDB; production classes">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
<javac destdir="${build.classes}"
target="${javac.target}"
source="${javac.source}"
debug="${javac.debug}"
optimize="${javac.optimize}"
encoding="${javac.encoding}"
includeantruntime="false">
<src path="${source.dir}"/>
</javac>
<copy todir="${build.classes}">
<fileset dir="${source.dir}" includes="${resources.patterns}"/>
</copy>
<path id="jejdb.classpath" location="${build.classes}"/>
<mkdir dir="${distr.home}"/>
<mkdir dir="${distr.lib}"/>
<jar destfile="${distr.home}/${distr.name}.jar" basedir="${build.classes}">
<!-- TODO: jar manifest-->
</jar>
</target>
<target name="compile.tests" depends="compile.production" description="Compile module JEJDB; test classes" if="with.tests">
<mkdir dir="${build.test.dir}"/>
<mkdir dir="${build.test.classes}"/>
<javac destdir="${build.test.classes}"
target="${javac.target}"
source="${javac.source}"
debug="${javac.debug}"
optimize="${javac.optimize}"
encoding="${javac.encoding}"
includeantruntime="false">
<src path="${source.test.dir}"/>
<classpath>
<path refid="lib.junit.classpath"/>
<path refid="jejdb.classpath"/>
</classpath>
</javac>
<copy todir="${build.test.classes}">
<fileset dir="${source.test.dir}" includes="${resources.patterns}"/>
</copy>
<path id="jejdb.test.classpath" location="${build.test.classes}"/>
<mkdir dir="${distr.home}"/>
<mkdir dir="${distr.lib}"/>
<delete dir="${test.data.dir}"/>
<mkdir dir="${test.data.dir}"/>
<mkdir dir="${test.reports.dir}"/>
<property environment="env"/>
<junit printsummary="on" showoutput="yes" haltonfailure="yes" haltonerror="yes" dir="${test.data.dir}" fork="true">
<sysproperty key="java.library.path" value="${basedir}${path.separator}${java.library.path}"/>
<env key="LD_LIBRARY_PATH" path="${basedir}${path.separator}${env.LD_LIBRARY_PATH}"/>
<formatter type="plain"/>
<classpath>
<path refid="lib.junit.classpath"/>
<path refid="jejdb.classpath"/>
<path refid="jejdb.test.classpath"/>
</classpath>
<batchtest todir="${test.reports.dir}">
<fileset dir="${source.test.dir}">
<include name="**/EJDB*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="compile.headers" depends="compile.production" if="build.native.headers">
<javah destdir="${source.native.dir}" verbose="true">
<class name="org.ejdb.driver.EJDB"/>
<class name="org.ejdb.driver.EJDBCollection"/>
<class name="org.ejdb.driver.EJDBQuery"/>
<class name="org.ejdb.driver.EJDBResultSet"/>
<classpath>
<path refid="jejdb.classpath"/>
</classpath>
</javah>
</target>
<target name="compile" depends="compile.production, compile.tests, compile.headers"/>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
<path id="lib.junit.classpath">
<fileset id="lib.junit.fileset" dir="${lib.dir}">
<include name="junit-4.11.jar"/>
<include name="hamcrest-core-1.3.jar"/>
</fileset>
</path>
</target>
<target name="clean" description="Cleanup">
<delete dir="${build.dir}"/>
<delete dir="${distr.home}"/>
</target>
<target name="build.native.headers" depends="clean" description="Build JNI headers for JEJDB">
<property name="build.native.headers" value="true"/>
<ant target="compile" inheritall="true" inheritrefs="true"/>
</target>
<target name="build" depends="clean" description="Build">
<ant target="compile" inheritall="true" inheritrefs="true"/>
</target>
<target name="build.and.test" depends="clean" description="Build JEJDB and run tests">
<property name="with.tests" value="true"/>
<ant target="compile" inheritall="true" inheritrefs="true"/>
</target>
<target name="build.doc" depends="init" description="Build JavaDocs for JEJDB">
<delete dir="${distr.doc}"/>
<mkdir dir="${distr.doc}"/>
<javadoc destdir="${distr.doc}"
Author="true"
version="true"
encoding="utf-8"
charset="utf-8"
docencoding="utf-8"
Private="false"
Use="true"
breakiterator="true"
Windowtitle="JEJDB Doc">
<fileset dir="${source.dir}" includes="**/*.java"/>
</javadoc>
</target>
</project>