-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbase.xml
292 lines (214 loc) · 10.5 KB
/
base.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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2008 University of Rochester
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- this is the base build file for the irplus project -->
<project name="base-build" xmlns:ivy="antlib:org.apache.ivy.ant" >
<!-- uncomment this to run the tests it does not matter what the value is so long as the
line is uncommented.
<property name="run.tests" value="true"/> -->
<!-- custom build directory this SHOULD be created ouside the project
this will allow users to have their own repository of custom
source code -->
<property name="custom.build.dir" value="../../ir_plus_custom/"/>
<!-- uncomment this to build a custom site - this is only needed if you have
modified jsp/source files - NOTE this must be commented out to de-activate
-->
<property name="build.custom" value="true"/>
<!-- build directory -->
<property name="build.dir" value="${basedir}/build"/>
<!-- test build directory -->
<property name="test.build.dir" value="${basedir}/test-build"/>
<!-- source directory -->
<property name="src.dir" value="${basedir}/src"/>
<!-- test source directory -->
<property name="test.dir" value="${basedir}/test"/>
<!-- testng library -->
<property name="testng.dir" value="${basedir}/test"/>
<!-- lib directory -->
<property name="lib.dir" value="${basedir}/lib"/>
<!-- location for reports -->
<property name="report.dir" value="${basedir}/reports"/>
<!-- distribution directory -->
<property name="dist.dir" value="${basedir}/${project.name}"/>
<!-- top level location for reports -->
<property name="report.dir" value="${basedir}/reports"/>
<!-- location for the test reports -->
<property name="test.report.dir" value="${report.dir}/test-reports"/>
<!-- location of the checkstyle xml file -->
<property name="checkstyle.xml" value="../checkstyle-xml/sun_checks.xml"/>
<!-- location of the checkstyle xml file -->
<property name="checkstyle.xsl" value="../checkstyle-xml/checkstyle-frames.xsl"/>
<!-- location for checkstyle report directory -->
<property name="checkstyle.report.dir" value="${report.dir}/checkstyle-reports"/>
<!-- location for checkstyle report xml file-->
<property name="checkstyle.report.xml" value="${checkstyle.report.dir}/checkstyle.xml"/>
<!-- location for checkstyle report html file-->
<property name="checkstyle.report.html" value="${checkstyle.report.dir}/checkstyle.html"/>
<!-- common configuration files for spring -->
<property name="spring.config.common.config" value="../spring-config-common/common"/>
<!-- project specific configuration files for spring (usually testing)-->
<property name="spring.project.config" value="${basedir}/spring-config"/>
<!-- common configuration files for ehcache -->
<property name="ehcache.config" value="../ehcache-config"/>
<!-- folder location for log4j debug file appender -->
<property name="log4j.debug.file.appender" value="${basedir}/log4j-config/debug-file-appender"/>
<!-- folder location for production log4j debug console output -->
<property name="log4j.debug.console.appender" value="${basedir}/log4j-config/debug-console-appender"/>
<!-- folder location for production log4j config xml file -->
<property name="log4j.production.appender" value="${basedir}/log4j-config/production-appender"/>
<!-- folder location for testng config file -->
<property name="testng.config" value="${basedir}/testng-config"/>
<!-- ivy dir -->
<property name="ivy.dir" value="${basedir}/ivy"/>
<!-- ivy jar file -->
<property name="ivy.jar" value="${ivy.dir}/ivy.jar" />
<!-- ivy jar file -->
<property name="ivy.report.dir" value="${report.dir}/ivy_report" />
<!-- version of ivy to be used -->
<property name="ivy.version" value="2.5.0" />
<!-- set the javac debug mode -->
<property name="javac.debug.mode" value="on" />
<!-- set the javac debug level -->
<property name="javac.debug.level" value="lines,vars,source" />
<!-- set the javac depreciation mode -->
<property name="javac.deprecation.mode" value="on"/>
<!-- java version to compile with -->
<property name="javac.java.version" value="7"/>
<!-- project version -->
<property name="project.version" value="2.2"/>
<!-- test properties file location -->
<property name="properties.config.test" value="../properties/test"/>
<!--local properties file location -->
<property name="properties.config.local" value="../properties/local"/>
<!--production properties file location -->
<property name="properties.config.production" value="../properties/production"/>
<!-- =================================
EMMA code coverage settings
=================================
-->
<!-- output directory used for EMMA coverage reports: -->
<property name="coverage.dir" value="${report.dir}/emma-coverage" />
<!-- path element used by EMMA taskdef below: -->
<path id="emma.lib">
<pathelement location="${lib.dir}/emma-2.0.5312.jar" />
<pathelement location="${lib.dir}/emma_ant-2.0.5312.jar" />
</path>
<target name="download-ivy" unless="skip.download">
<mkdir dir="${ivy.dir}" />
<!-- download Ivy from web site so that it can be used
even without any special installation -->
<echo message="Please wait this may take a few minutes - installing ivy..." />
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar"
dest="${ivy.jar}" usetimestamp="true" />
</target>
<!-- =================================
target: install-ivy
this target is not necessary if you put ivy.jar in your ant lib directory
if you already have ivy in your ant lib, you can simply remove this
target and the dependency the 'go' target has on it
=================================
-->
<target name="install-ivy" depends="download-ivy"
description="--> install ivy in classpath for other targets">
<!-- try to load ivy here from local ivy dir, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir.
-->
<path id="ivy.lib.path">
<fileset dir="${ivy.dir}" includes="*.jar" />
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant"
classpathref="ivy.lib.path" />
</target>
<!-- =================================
target: clean-ivy
=================================
-->
<target name="clean-ivy" description="--> clean the ivy installation">
<delete dir="${ivy.dir}" />
</target>
<!-- clean the ivy cache -->
<target name="clean-cache" depends="install-ivy"
description="--> clean the ivy cache">
<ivy:cleancache />
</target>
<!-- Ivy depencency report -->
<target name="ivy-report" depends="resolve"
description="--> report the resolve actions">
<mkdir dir="${ivy.report.dir}" />
<ivy:report todir="${ivy.report.dir}" />
</target>
<!-- use ivy to retive the jar files into the repository set by the
ivy configuration settings -->
<target name="resolve"
depends="install-ivy"
description="--> places the files in the ivy repository">
<ivy:resolve />
</target>
<!-- download and place into the default lib folder -->
<target name="retrieve" depends="ivy-report"
description="-->Place the files in location for project">
<ivy:retrieve sync="true" pattern="lib/[module]-[revision].[ext]"/>
</target>
<!-- define the base javac complie command to make sure proper settings
across all projects -->
<presetdef name="javac" uri="http://edu.ur/d1/ext">
<javac debug="${javac.debug.mode}"
nowarn="false"
deprecation="${javac.deprecation.mode}"
source="${javac.java.version}"
debuglevel="${javac.debug.level}"
target="${javac.java.version}"/>
</presetdef>
<target name="checkstyle-run" depends="retrieve" xmlns:cs="antlib:com.puppycrawl.checkstyle">
<path id="checkstyle.lib.path">
<fileset dir="${lib.dir}" includes="checkstyle-5.0-beta01.jar" />
</path>
<typedef resource="checkstyletask.properties"
uri="antlib:com.puppycrawl.checkstyle"
classpathref="libraries"
onerror="failall"/>
<mkdir dir="${checkstyle.report.dir}"/>
<cs:checkstyle classpathref="libraries"
failOnViolation="false"
failureProperty="checkstyle.failed"
config="${checkstyle.xml}">
<formatter type="plain"/>
<formatter type="xml"
toFile="${checkstyle.report.xml}"/>
<fileset dir="${src.dir}" includes="**/*.java"/>
<fileset dir="${test.dir}" includes="**/*.java"/>
</cs:checkstyle>
</target>
<target name="checkstyle-report" depends="checkstyle-run" if="checkstyle.failed">
<xslt style="${checkstyle.xsl}" in="${checkstyle.report.xml}"
out="${checkstyle.report.html}"/>
</target>
<target name="checkstyle" depends="checkstyle-report"/>
<!-- CODE COVERAGE initialization. -->
<target name="emma" description="turns on EMMA's instrumentation/reporting">
<!-- Remove the old libraries -->
<delete dir="${coverage.dir}"/>
<!-- make the new dir -->
<mkdir dir="${coverage.dir}"/>
<property name="emma.enabled" value="false" />
<!-- this property, if overriden via -Demma.filter=<list of filter specs>
on ANT's command line, will set the coverage filter; by default,
all classes found in 'run.classpath' pathref will be instrumented:
-->
<property name="emma.filter" value="" />
</target>
</project>