-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildGlobals.xml
96 lines (76 loc) · 3.37 KB
/
buildGlobals.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
<project basedir=".">
<description>
This ant build file contains the properties and taskdefs we will need
for virtually every build task, including OS detection, provision of
ant-contrib, and the taskdef for Jing.
</description>
<!--##### GENERAL BUILD PROPERTIES #####-->
<!--We are currently using Saxon 11.-->
<property name="saxon" value="${basedir}/Lib/saxon/saxon-he-11.jar"/>
<!--Jing in the Lib directory.-->
<property name="jing" value="${basedir}/Lib/jing.jar"/>
<!--We expect a local installation of the TEI Stylesheets for this early
testing; the default must be overridden with -DstylesheetsPath=...-->
<property name="stylesheetsPath" value="${basedir}/../Stylesheets"/>
<!-- A group separator for avoiding spaces etc. -->
<property name="sequenceSeparator" value="␝"/>
<!-- Directory where we store the Schxslt resources. -->
<property name="schxsltDir" value="${basedir}/Lib/schxslt"/>
<!-- File which compiles Schematron to XSLT. -->
<property name="schxsltCompiler" value="${schxsltDir}/xslt/2.0/pipeline-for-svrl.xsl"/>
<!-- We need ant-contrib to do foreach. -->
<!--
Note: We expect the 4 ATOP developers to have ant-contrib
installed. If & when an ant build process is delivered to users,
we should consider including the ant-contrib library in our Lib/
so that users do not have to download it; or we could rewrite
targets to avoid ant-contrib components.
-->
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<!-- We validate against closed schema with Jing. -->
<taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
<classpath location="${jing}"/>
</taskdef>
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isUnix">
<os family="unix" />
</condition>
<target name="setWindowsAntPath" if="isWindows">
<property name="antPath" value="${ant.home}/bin/ant.bat" />
</target>
<target name="setUnixAntPath" if="isUnix">
<property name="antPath" value="ant" />
</target>
<target name="checkNetworkConnection">
<description>
TARGET checkNetworkConnection
We sometimes need to know if we have an internet connection
or not, in order to run some tests with either remote or local
resources. This tries to get a file from the TEI site, and
sets a property based on whether it succeeds or not.
</description>
<delete file="${basedir}/temp/p5subset.xml"/>
<mkdir dir="${basedir}/temp"/>
<get src="https://www.tei-c.org/Vault/P5/current/xml/tei/odd/p5subset.xml"
dest="${basedir}/temp/p5subset.xml"
retries="5"
maxtime="30"
ignoreerrors="true"/>
<available property="fileExists" file="${basedir}/temp/p5subset.xml"/>
<if>
<equals arg1="${fileExists}" arg2="true"/>
<then>
<property name="workingNetworkConnection" value="true"/>
</then>
<else>
<property name="workingNetworkConnection" value="false"/>
</else>
</if>
<echo message="Do we have a working network connection? ${workingNetworkConnection}"/>
</target>
<!--##### TESTING-RELATED PROPERTIES #####-->
<!--Current PLODD for testing transpile step.-->
<!--<property name="inputTestPlodd" value="${basedir}/Tests/resources/in_vitro_ODDs/transpile.plodd"/>-->
</project>