forked from vivo-community/vivo-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
136 lines (117 loc) · 4.32 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
<?xml version="1.0"?>
<!-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<!-- ======================================================================
Build script for the NIH VIVO product.
The deploy.properties file contains both build properties and runtime
properties.
The required build properties are:
vitroCore.dir
tomcat.home
webapp.name
====================================================================== -->
<project name="vivo" 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" />
<!-- =================================
Copy Solr modifications to Vitro solr/
================================= -->
<copy todir="${vitro.core.dir}/solr" overwrite="true">
<fileset dir="solr"/>
</copy>
<!--
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" />
<!-- - - - - - - - - - - - - - - - - -
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="${nihvivo.dir}/productMods" />
</not>
<not>
<present targetdir="./productMods" />
</not>
</fileset>
<fileset dir="${nihvivo.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="${nihvivo.dir}" />
</not>
<not>
<present targetdir="." />
</not>
</fileset>
<fileset dir="${nihvivo.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>
</project>