-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
executable file
·188 lines (161 loc) · 7.49 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
<project name="WDK" basedir=".">
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooo Dependencies oooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<import file="${projectsDir}/FgpUtil/build.xml" />
<import file="${projectsDir}/WSF/build.xml" />
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooo Installation oooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<target name="WDK-Installation" depends="FgpUtil-Installation,
WSF-Installation,
WDK/Model-Installation,
WDK/Service-Installation">
<ant target="defaultProjectInstall">
<property name="project" value="WDK" />
</ant>
</target>
<!-- ooooooooooooooooooooooo Install Components ooooooooooooooooooooooo -->
<target name="WDK/Model-Installation">
<ant target="installOracleDriver" />
<ant target="defaultComponentInstall">
<property name="project" value="WDK" />
<property name="component" value="Model" />
</ant>
</target>
<target name="WDK/Service-Installation">
<ant target="defaultComponentInstall">
<property name="project" value="WDK" />
<property name="component" value="Service" />
</ant>
<ant target="WDK-Service-Schema"/>
</target>
<target name="WDK-Service-Schema" depends="installYarnBin">
<echo message="Resolving and merging JSON Schema files"/>
<exec dir="${targetDir}/bin"
executable="installSchema.sh"
failonerror="true"
failifexecutionfails="true">
<arg line="${projectsDir} ${targetDir}"/>
</exec>
<ant target="createSchemaJar"/>
</target>
<target name="createSchemaJar">
<echo message="Creating JSON schema jar file at ${targetDir}/lib/java/wdk-service-schema.jar"/>
<mkdir dir="${targetDir}/lib/java"/>
<exec dir="${targetDir}/doc/WDK/Service"
executable="jar"
failonerror="true"
failifexecutionfails="true">
<arg line="cf ${targetDir}/lib/java/wdk-service-schema.jar schema"/>
</exec>
</target>
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooo Web Installation oooooooooooooooooooooooo -->
<!-- oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo -->
<target name="WDK-WebInstallation" depends="WSF-WebInstallation,
GusHome,
WDK/Service-WebInstallation">
<echo message="." />
<echo message="IMPORTANT REMINDER: If you have not already done so, please copy any .jar needed for database connectivity (such as the oracle file ojdbc14.jar) from ${targetDir}/lib/java/db_driver into your webapp server's designated place (such as common/lib for Tomcat). See the installation instructions available at www.gusdb.org/wdk for details." />
<echo message="." />
</target>
<target name="WDK/Service-WebInstallation" depends="WDK/Service-Installation">
<antcall target="runRaml2Html">
<param name="inputFile" value="${targetDir}/doc/WDK/Service/raml/api.raml"/>
<param name="outputFile" value="${htdocsTargetDir}/service-api.html"/>
</antcall>
</target>
<target name="GusHome" depends="WDK-Installation,
checkLinks,
webInfDir,
libLink,
configLink,
binLink,
dataLink,
buildlogLink,
rngLink,
perlLink,
xmlLink,
wdkLink"/>
<target name="checkLinks">
<available file="${webappTargetDir}/WEB-INF" property="webInfDirExists" />
<available file="${webappTargetDir}/WEB-INF/lib" property="libLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/config"
property="configLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/bin"
property="binLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/data"
property="dataLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/.buildlog"
property="buildlogLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/lib/rng"
property="rngLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/lib/perl"
property="perlLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/lib/xml"
property="xmlLinkExists" />
<available file="${webappTargetDir}/WEB-INF/wdk-model/lib/wdk"
property="wdkLinkExists" />
</target>
<target name="webInfDir" unless="webInfDirExists">
<mkdir dir="${webappTargetDir}/WEB-INF" />
</target>
<target name="libLink" unless="libLinkExists">
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/lib"/>
<property name="resource" value="${targetDir}/lib/java"/>
</ant>
</target>
<target name="configLink" unless="configLinkExists">
<mkdir dir="${webappTargetDir}/WEB-INF/wdk-model"/>
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/config"/>
<property name="resource" value="${targetDir}/config"/>
</ant>
</target>
<target name="binLink" unless="binLinkExists">
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/bin"/>
<property name="resource" value="${targetDir}/bin"/>
</ant>
</target>
<target name="dataLink" unless="dataLinkExists">
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/data"/>
<property name="resource" value="${targetDir}/data"/>
</ant>
</target>
<target name="buildlogLink" unless="buildlogLinkExists">
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/.buildlog"/>
<property name="resource" value="${targetDir}/.buildlog"/>
</ant>
</target>
<target name="rngLink" unless="rngLinkExists">
<mkdir dir="${webappTargetDir}/WEB-INF/wdk-model/lib" />
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/lib/rng"/>
<property name="resource" value="${targetDir}/lib/rng"/>
</ant>
</target>
<target name="perlLink" unless="perlLinkExists">
<mkdir dir="${webappTargetDir}/WEB-INF/wdk-model/lib" />
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/lib/perl"/>
<property name="resource" value="${targetDir}/lib/perl"/>
</ant>
</target>
<target name="xmlLink" unless="xmlLinkExists">
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/lib/xml"/>
<property name="resource" value="${targetDir}/lib/xml"/>
</ant>
</target>
<target name="wdkLink" unless="wdkLinkExists">
<ant target="symlink">
<property name="link" value="${webappTargetDir}/WEB-INF/wdk-model/lib/wdk"/>
<property name="resource" value="${targetDir}/lib/wdk"/>
</ant>
</target>
</project>