-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
172 lines (151 loc) · 5.31 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
<?xml version="1.0"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- ======================================================================
Build script for the fourth tier VIVO-Cornell product with profile output.
The build.properties file contains build properties
The runtime.properties file contains runtime properties.
The required build properties are:
vitroCore.dir
nihvivo.dir
vivocornell.dir
webapp.name
A standard tomcat deploy also requires:
vitro.home
tomcat.home
====================================================================== -->
<project name="vivoCornellOutput" default="describe">
<!--
The build directory goes in the product directory.
Everything else hangs from the build directory.
-->
<property name="build.dir" location="./.build" />
<property name="appbase.dir" location="${build.dir}/appBase" />
<!--
Load the properties from deploy.properties.
-->
<property name="build.properties.file" location="build.properties" />
<fail message="You must create a "${build.properties.file}" file.">
<condition>
<not>
<available file="${build.properties.file}" />
</not>
</condition>
</fail>
<property file="${build.properties.file}" />
<fail unless="vitro.core.dir"
message="${build.properties.file} must contain a value for vitro.core.dir" />
<fail unless="nihvivo.dir"
message="${build.properties.file} must contain a value for nihvivo.dir" />
<fail unless="vivocornell.dir"
message="${build.properties.file} must contain a value for vivocornell.dir" />
<!--
Base it all on the core build file.
-->
<import file="${vitro.core.dir}/webapp/build.xml" />
<!-- - - - - - - - - - - - - - - - - -
target: prepare
Override the core version, so we can merge the three levels before building.
- - - - - - - - - - - - - - - - - -->
<target name="prepare" depends="product-prepare,vitroCore.prepare,deployWebImageCapture" />
<!-- - - - - - - - - - - - - - - - - -
target: product-prepare
- - - - - - - - - - - - - - - - - -->
<target name="product-prepare">
<mkdir dir="${appbase.dir}" />
<mkdir dir="${appbase.dir}/web" />
<copy todir="${appbase.dir}/web" includeemptydirs="true">
<fileset dir="${corebase.dir}/web">
<not>
<present targetdir="${vivocornell.dir}/productMods" />
</not>
<not>
<present targetdir="${nihvivo.dir}/productMods" />
</not>
<not>
<present targetdir="./productMods" />
</not>
</fileset>
<fileset dir="${nihvivo.dir}/productMods">
<not>
<present targetdir="${vivocornell.dir}/productMods" />
</not>
<not>
<present targetdir="./productMods" />
</not>
</fileset>
<fileset dir="${vivocornell.dir}/productMods">
<not>
<present targetdir="./productMods" />
</not>
</fileset>
<fileset dir="./productMods" />
</copy>
<patternset id="appbase.patterns">
<include name="src/**/*" />
<include name="lib/**/*" />
<include name="rdf/**/*" />
<include name="test/**/*" />
<include name="themes/**/*" />
<include name="languages/**/*" />
<include name="config/*.properties" />
<include name="config/*.txt" />
<include name="config/jarlist/*.txt" />
<include name="config/solr/*" />
<include name="context.xml" />
</patternset>
<copy todir="${appbase.dir}" includeemptydirs="true">
<fileset dir="${corebase.dir}">
<patternset refid="appbase.patterns" />
<exclude name="themes/**/*/" />
<not>
<present targetdir="${vivocornell.dir}" />
</not>
<not>
<present targetdir="${nihvivo.dir}" />
</not>
<not>
<present targetdir="." />
</not>
</fileset>
<fileset dir="${nihvivo.dir}">
<patternset refid="appbase.patterns" />
<not>
<present targetdir="${vivocornell.dir}" />
</not>
<not>
<present targetdir="." />
</not>
</fileset>
<fileset dir="${vivocornell.dir}">
<patternset refid="appbase.patterns" />
<not>
<present targetdir="." />
</not>
</fileset>
<fileset dir=".">
<patternset refid="appbase.patterns" />
</fileset>
</copy>
</target>
<!-- =================================
target: revisionInfo
Override the core version, to get the 3-level effect.
================================= -->
<target name="revisionInfo"
depends="vitroCore.revisionInfo"
description="--> Store revision info in build">
<addRevisionInfoLine productName="nihvivo" productCheckoutDir="${nihvivo.dir}" />
<addRevisionInfoLine productName="${ant.project.name}" productCheckoutDir="${basedir}" />
</target>
<!-- =================================
target: webImageCapture
================================= -->
<target name="deployWebImageCapture"
description="--> copy webImageCatpure script to vitro.home">
<copy todir="${vitro.home}/webImageCapture" includeemptydirs="true">
<fileset dir="webImageCapture"/>
</copy>
<chmod perm="ug+rx"
file="${vitro.home}/webImageCapture/capture.py" />
</target>
</project>