-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathget.saxonHEResources.xml
92 lines (83 loc) · 3.88 KB
/
get.saxonHEResources.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
<?xml version="1.0" encoding="UTF-8"?>
<project
name="ant-hology.getLibraryDefs.saxonHEResources"
basedir="."
default="ant-hology.getLibraryDefs.saxonHEResources"
xmlns:if="ant:if"
xmlns:unless="ant:unless"
>
<dirname property="ant-hology.getLibraryDefs.saxonHEResources.dir" file="${ant.file.ant-hology.getLibraryDefs.saxonHEResources}"/>
<import file="${ant-hology.dir}/commonProperties.xml" unless:set="ant-hology.commonProperties.loaded"/>
<import file="${ant-hology.getLibraryDefs.dir}/get.saxonHE.xml" unless:set="ant-hology.getLibraryDefs.saxonHE.loaded"/>
<!-- See http://saxon.sourceforge.net/ -->
<target
name="ant-hology.get.saxonHEResources"
description="Installs saxonHE Resources in saxonHE library install folder."
depends="ant-hology.get.saxonHE"
unless="ant-hology.availableLibraries.saxonHEResources">
<condition
property="ant-hology.availableLibraries.saxonHEResources"
unless:set="ant-hology.availableLibraries.saxonHEResources"
>
<and>
<available
file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources"
type="dir"/>
<available
file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-saxonHE-9.5.1.2"
type="dir"/>
<available
file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-userdoc"
type="dir"/>
</and>
</condition>
<sequential
unless:set="ant-hology.availableLibraries.saxonHEResources"
>
<echo>Installing saxonHE v9.5 and 9.5.1.2 resources</echo>
<delete dir="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources"/>
<get
src="http://sourceforge.net/projects/saxon/files/Saxon-HE/9.5/saxon-resources9-5.zip/download"
dest="${ant-hology.lib.dir}/saxonHE-9.5.1.2/saxon-resources9-5.zip"/>
<unzip
src="${ant-hology.lib.dir}/saxonHE-9.5.1.2/saxon-resources9-5.zip"
dest="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources"/>
<unzip
src="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-userdoc.zip"
dest="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-userdoc"/>
<get
src="http://sourceforge.net/projects/saxon/files/Saxon-HE/9.5/saxon9-5-1-2source.zip/download"
dest="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/saxon9-5-1-2source.zip"/>
<unzip
src="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/saxon9-5-1-2source.zip"
dest="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-saxonHE-9.5.1.2"/>
<delete file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/saxon-resources9-5.zip"/>
<delete file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-userdoc.zip"/>
<delete file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/saxon9-5-1-2source.zip"/>
<!--Test if installation was successful.-->
<condition property="ant-hology.availableLibraries.saxonHEResources">
<and>
<available
file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources"
type="dir"/>
<available
file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-saxonHE-9.5.1.2"
type="dir"/>
<available
file="${ant-hology.lib.dir}/saxonHE-9.5.1.2/resources/source-userdoc"
type="dir"/>
</and>
</condition>
<fail message="Installation failed. Expected resources dirs under saxonHE-9.5.1.2 dir not present.">
<!--Note, condition inside fail task doesn't support '@property' so it is defined in previous task-->
<condition>
<not>
<isset property="ant-hology.availableLibraries.saxonHEResources"/>
</not>
</condition>
</fail>
<echo>saxonHE v9.5 resources dir installed successfully under saxonHE v9.5.1.2.</echo>
</sequential>
</target>
<property name="ant-hology.getLibraryDefs.saxonHEResources.loaded" value="true"/>
</project>