-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
137 lines (115 loc) · 5.12 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
<?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 build.properties file contains build properties
The runtime.properties file contains runtime properties.
The required build properties are:
vitroCore.dir
webapp.name
A standard tomcat deploy also requires:
vitro.home
tomcat.home
====================================================================== -->
<project name="ld4l-vitro" 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 build.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" />
<!--
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 two 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="./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/**/*" if="skip.core.themes" />
<not>
<present targetdir="." />
</not>
</fileset>
<fileset dir=".">
<patternset refid="appbase.patterns" />
</fileset>
</copy>
</target>
<import file="${vitro.core.dir}/webapp/build.xml" />
<!-- =================================
target: revisionInfo
Override the core version, to get the 2-level effect.
================================= -->
<target name="revisionInfo" depends="vitroCore.revisionInfo" unless="skipinfo" description="--> Store revision info in build">
<addRevisionInfoLine productName="${ant.project.name}" productCheckoutDir="${basedir}" />
</target>
<!-- =================================
target: licenser
In regular use, checks that all appropriate source files have license tags.
At release time, applies license text to source files.
The files are handled as properties so they can be overridden from the command line, if desired.
Override the core version, to get the 2-level effect.
================================= -->
<target name="licenser" description="--> Check source files for licensing tags">
<property name="licenser.product.properties.file" location="./config/licenser/licenser.properties" />
<property name="licenser.core.properties.file" location="${corebase.dir}/config/licenser/licenser.properties" />
<runLicenserScript productname="${ant.project.name}" propertiesfile="${licenser.product.properties.file}" />
<runLicenserScript productname="Vitro core" propertiesfile="${licenser.core.properties.file}" />
</target>
<!-- =================================
target: deployTestApp
================================= -->
<target name="deployTestApp" depends="deployProperties" description="description">
<property name="testApp.webapp.dir" value="${tomcat.home}/webapps/testApp" />
<property name="testApp.source.dir" value="utilities/acceptance-tests/testApp" />
<mkdir dir="${testApp.webapp.dir}" />
<sync todir="${testApp.webapp.dir}" includeemptydirs="true">
<fileset dir="${testApp.source.dir}" />
</sync>
</target>
</project>