-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
240 lines (217 loc) · 10.6 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<?xml version="1.0" encoding="utf-8"?>
<!--
// Parliament is licensed under the BSD License from the Open Source
// Initiative, http://www.opensource.org/licenses/bsd-license.php
//
// Copyright (c) 2001-2019, BBN Technologies, Inc.
// All rights reserved.
-->
<project name="KBMasterBuild" default="runTests" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>Master build script for the KB repository.</description>
<import file="${basedir}/build-common.xml"/>
<property name="distroDir" value="${targetDir}/distro"/>
<property name="javadocDir" value="${targetDir}/bin/javadoc"/>
<property name ="javadocCompleteFlag" value="${targetDir}/bin/javadoc-created.txt"/>
<property name="windowsReleaseDir" value="${artifactsDir}/msvc-14.1/release"/>
<property name="macosReleaseDir" value="${artifactsDir}/clang/release/universal"/>
<target name="clean" description="Cleans up after the ant build">
<echo message="Using java version ${java.version}"/>
<delete dir="${targetDir}" deleteonexit="true"/>
<delete file="${basedir}/Parliament/Test/ParliamentKbConfig.txt"/>
<delete file="${basedir}/Parliament/Test/ParliamentLogConfig.txt"/>
<delete dir="${basedir}/Parliament/Test/kb-data"/>
<delete dir="${basedir}/indexes"/>
<delete dir="${basedir}/jena/JenaGraph/kb-data"/>
<delete dir="${basedir}/jena/JenaGraph" includes="parliament-test.log*"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor/log"/>
<delete dir="${basedir}/kb-data"/>
<delete dir="${basedir}" includes="parliament-test.log*"/>
<delete dir="${basedir}/jena/JenaGraph/lib"/>
<delete dir="${basedir}/jena/JenaGraph/union-test-kb-data"/>
<delete dir="${basedir}/jena/JosekiExtensions/lib"/>
<delete dir="${basedir}/jena/JosekiParliamentClient/lib"/>
<delete dir="${basedir}/jena/NumericIndex/lib"/>
<delete dir="${basedir}/jena/SpatialIndexProcessor/lib"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor/lib"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor_old/lib"/>
<delete dir="${basedir}/Parliament/lib"/>
<delete dir="${basedir}/Parliament/KbCore/parliament/generated"/>
<delete dir="${basedir}/sesame/CSameAsSail/lib"/>
<delete dir="${basedir}/sesame/LuceneSail/lib"/>
<delete dir="${basedir}/sesame/ParliamentSail/lib"/>
<delete dir="${basedir}/sesame/SameAsSail/lib"/>
<delete dir="${basedir}/sesame/Swrl2Sesame/lib"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="clean" inheritAll="false"/>
</target>
<target name="cleanEclipseBuild" description="Cleans up the Eclipse build directories">
<delete dir="${basedir}/jena/JenaGraph/bin"/>
<delete dir="${basedir}/jena/JosekiExtensions/bin"/>
<delete file="${basedir}/jena/JosekiExtensions/build.log"/>
<delete dir="${basedir}/jena/JosekiParliamentClient/bin"/>
<delete dir="${basedir}/jena/NumericIndex/bin"/>
<delete dir="${basedir}/jena/SpatialIndexProcessor/bin"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor/bin"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor_old/bin"/>
<delete dir="${basedir}/Parliament/bin"/>
<delete dir="${basedir}/Parliament/JniAssessments/bin"/>
<delete file="${basedir}/Parliament/AdminClient/.settings/language.settings.xml"/>
<delete file="${basedir}/Parliament/KbCore/.settings/language.settings.xml"/>
<delete file="${basedir}/Parliament/Test/.settings/language.settings.xml"/>
<delete dir="${basedir}/sesame/CSameAsSail/bin"/>
<delete dir="${basedir}/sesame/LuceneSail/bin"/>
<delete dir="${basedir}/sesame/ParliamentSail/bin"/>
<delete dir="${basedir}/sesame/SameAsSail/bin"/>
<delete dir="${basedir}/sesame/Swrl2Sesame/bin"/>
<delete includeemptydirs="true">
<fileset dir="${basedir}/Parliament" includes="**/Debug_with_*/"/>
<fileset dir="${basedir}/Parliament" includes="**/Release_with_*/"/>
</delete>
</target>
<target name="runTests" depends="createDistro" description="Runs extended unit and integration tests">
<ant dir="${basedir}/jena/JosekiParliamentClient" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/JenaGraph" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/NumericIndex" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/TemporalIndexProcessor" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/SpatialIndexProcessor" target="runTests" inheritAll="false"/>
<!--
<ant dir="${basedir}/sesame/CSameAsSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/sesame/ParliamentSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/sesame/LuceneSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/sesame/SameAsSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/sesame/Swrl2Sesame" target="runTests" inheritAll="false"/>
-->
<junitreport todir="${reportsDir}" tofile="aggregated-junit-reports.xml">
<fileset dir="${reportsDir}" includes="**/TEST-*.xml"/>
<report format="noframes" todir="${reportsDir}"/>
</junitreport>
</target>
<target name="createDistro" description="Create the binary distribution"
depends="buildCode,compileJavadoc,buildDeployableServerList">
<foreach target="copyDocs" param="toDir" list="${deployableServerList}"
delimiter="|" inheritall="true"/>
<foreach target="zipDeployableServer" param="srcDir" list="${deployableServerList}"
delimiter="|" inheritall="true"/>
</target>
<target name="buildCode" depends="init">
<ant dir="${basedir}/Parliament" target="deliverArtifacts" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiParliamentClient" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/JenaGraph" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="prepareDeployableServers" inheritAll="false"/>
<ant dir="${basedir}/jena/NumericIndex" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/SpatialIndexProcessor" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/TemporalIndexProcessor" target="jar" inheritAll="false"/>
<ant dir="${basedir}/sesame/CSameAsSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/sesame/ParliamentSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/sesame/LuceneSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/sesame/SameAsSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/sesame/Swrl2Sesame" target="jar" inheritAll="false"/>
</target>
<!-- Copy docs to the ${toDir} directory. Expects parameter toDir. -->
<target name="copyDocs">
<copy todir="${toDir}" file="${kbRootDir}/doc/UserGuide/ParliamentUserGuide.pdf"/>
<copy todir="${toDir}/license">
<fileset dir="${basedir}/license" includes="*.html,*.md,*.txt"/>
</copy>
<copy tofile="${toDir}/license/parliament-license.md" file="${basedir}/LICENSE.md"/>
<copy todir="${toDir}/javadoc">
<fileset dir="${javadocDir}"/>
</copy>
</target>
<!-- Copy docs to the ${srcDir} directory. Expects parameter srcDir. -->
<target name="zipDeployableServer">
<basename property="zipName" file="${srcDir}"/>
<delete file="${distroDir}/${zipName}.zip"/>
<mkdir dir="${distroDir}"/>
<zip destfile="${distroDir}/${zipName}.zip" encoding="UTF8" level="9">
<zipfileset dir="${srcDir}" prefix="${zipName}">
<exclude name="*.sh"/>
<exclude name="bin/jsvc"/>
<exclude name="bin/ParliamentAdmin"/>
</zipfileset>
<zipfileset dir="${srcDir}" prefix="${zipName}" filemode="755">
<include name="*.sh"/>
<include name="bin/jsvc"/>
<include name="bin/ParliamentAdmin"/>
</zipfileset>
</zip>
</target>
<fileset id="javadocSrcPath" dir="${kbRootDir}">
<include name="Parliament/java/**/*.java"/>
<!--include name="Parliament/JniAssessments/**/*.java"/-->
<include name="jena/JenaGraph/src/**/*.java"/>
<include name="jena/JosekiExtensions/src/**/*.java"/>
<include name="jena/JosekiParliamentClient/src/**/*.java"/>
<include name="jena/NumericIndex/src/**/*.java"/>
<include name="jena/SpatialIndexProcessor/src/**/*.java"/>
<include name="jena/TemporalIndexProcessor/src/**/*.java"/>
<!-- include name="sesame/CSameAsSail/src/**/*.java"/>
<include name="sesame/LuceneSail/src/**/*.java"/>
<include name="sesame/ParliamentSail/src/**/*.java"/>
<include name="sesame/SameAsSail/src/**/*.java"/>
<include name="sesame/Swrl2Sesame/src/**/*.java"/ -->
</fileset>
<target name="javadocUpToDateCheck">
<uptodate property="javadocUpToDate" targetfile="${javadocCompleteFlag}">
<srcfiles refid="javadocSrcPath"/>
</uptodate>
</target>
<target name="compileJavadoc" depends="init,javadocUpToDateCheck" unless="javadocUpToDate" description="Builds the javadocs">
<delete dir="${javadocDir}"/>
<mkdir dir="${javadocDir}"/>
<javadoc
destdir="${javadocDir}"
defaultexcludes="yes"
Author="false"
Version="true"
Use="true"
windowtitle="Parliament API Documentation"
doctitle="Parliament&trade; API Documentation"
header="Parliament&trade;"
encoding="UTF-8"
charset="UTF-8"
docencoding="UTF-8"
verbose="false"
additionalparam="-Xdoclint:all"
noqualifier="java.lang:java.util:java.io"
useexternalfile="yes">
<bottom>
Copyright &copy; 2001-2022 by BBN Technologies, Inc.&nbsp;
All rights reserved.&nbsp;
Use is subject to <a
href="http://opensource.org/licenses/bsd-license.php"
>license terms</a>.&nbsp;
BBN&reg; is a registered trademark of BBN Technologies, Inc.&nbsp;
Parliament&trade; is a trademark of BBN Technologies, Inc.
</bottom>
<sourcefiles>
<fileset refid="javadocSrcPath"/>
</sourcefiles>
<classpath>
<fileset dir="${basedir}/jena/JosekiExtensions/lib/bridge" includes="**/*.jar"/>
<fileset dir="${basedir}/jena/JosekiExtensions/lib/server" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/deegree" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/joseki" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/openmap" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/swrl-jaxb" includes="swrl-jaxb*.jar"/>
<!-- fileset dir="${basedir}/sesame/LuceneSail/lib" includes="**/*.jar"/ -->
</classpath>
<arg value="-quiet"/>
<arg value="-Xdoclint:all,-missing"/>
</javadoc>
<touch file="${javadocCompleteFlag}"/>
</target>
<target name="init">
<echo message="Using java version ${java.version}"/>
<mkdir dir="${artifactsDir}"/>
<mkdir dir="${reportsDir}"/>
</target>
<target name="continuous-build" depends="git-pull, runTests"
description="Performs the continuous build"/>
<target name="git-pull" depends="clean">
<echo message="Pulling from git ..."/>
<exec executable="git">
<arg line="pull"/>
</exec>
</target>
</project>