forked from openclover/clover
-
Notifications
You must be signed in to change notification settings - Fork 1
/
common.xml
565 lines (489 loc) · 27.4 KB
/
common.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
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<project name="common" basedir="." default="common.init">
<dirname property="common.base" file="${ant.file.common}"/>
<!-- output directory -->
<property name="build.dir" location="${common.base}/target"/>
<!-- where to keep downloaded third party libraries -->
<property name="build.deps.dir" location="${common.base}/target/dependencies"/>
<!-- Load local environment settings -->
<property file="${user.home}/build.properties"/>
<property file="build.properties"/>
<property name="lib.dir" location="${common.base}/lib"/>
<property name="repkg.clover.jar" location="${build.dir}/clover-repkg.jar"/>
<property name="clover.url" value="http://openclover.org"/>
<property name="clover.help.url" value="http://openclover.org/documentation"/>
<property name="clover.license.agreement.url" value="https://www.apache.org/licenses/LICENSE-2.0.html"/>
<property name="clover.repository.url" value="ssh://git@github.com:openclover/clover.git"/>
<!-- fail build if tests fail or have errors - defaults to not failing -->
<property name="fail.if.notpass" value="false"/>
<!-- whether to not download 3rd party jars if they already exist -->
<property name="build.dependency.skip.existing" value="true"/>
<!-- Java we want to build against -->
<property name="jdk.target" value="1.7"/>
<property name="source.level" value="1.7"/>
<!-- Default Groovy version. Use the latest available. -->
<property name="default.groovy.version" value="2.4.15"/> <!-- TODO can't use 2.3.0+ because dumpAST() fails -->
<!-- Default Ant version. Use the latest available. -->
<property name="default.ant.version" value="1.9.14"/>
<property name="mvn.version" value="3.2.5"/>
<!-- Versions of JUnit5 libraries and its dependencies -->
<property name="junit.jupiter.version" value="5.4.1"/>
<property name="junit.vintage.version" value="5.4.1"/>
<property name="junit.platform.version" value="1.4.1"/>
<property name="opentest4j.version" value="1.1.1"/>
<!-- ========================================================================== -->
<!-- Maven Central Repository - used for downloading 3rd party artifacts -->
<property name="maven.central.url" value="https://repo1.maven.org/maven2"/>
<!-- Fetching JAR from Maven Central -->
<macrodef name="get-jar">
<attribute name="src"/>
<attribute name="dest"/>
<sequential>
<mkdir dir="${build.deps.dir}"/>
<get src="${maven.central.url}/@{src}" dest="${build.deps.dir}/@{dest}"
skipexisting="${build.dependency.skip.existing}" verbose="false" quiet="true"/>
</sequential>
</macrodef>
<get-jar src="org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar" dest="maven-ant-tasks-2.1.3.jar"/>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
classpath="${build.deps.dir}/maven-ant-tasks-2.1.3.jar"/>
<get-jar src="ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar" dest="ant-contrib-1.0b3.jar"/>
<taskdef resource="net/sf/antcontrib/antlib.xml"
classpath="${build.deps.dir}/ant-contrib-1.0b3.jar"/>
<get src="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jarjar/jarjar-1.0rc7.jar"
dest="${build.deps.dir}/jarjar-1.0rc7.jar" skipexisting="${build.dependency.skip.existing}"
verbose="false" quiet="true"/>
<taskdef name="jarjar"
classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${build.deps.dir}/jarjar-1.0rc7.jar"/>
<!-- ========================================================================== -->
<property name="clover.historydir" value="${user.home}/cloverhistory"/>
<property name="ide.eval.license" value=""/>
<tstamp>
<format property="build.date" pattern="MMMM dd yyyy" locale="en,US"/>
<format property="build.stamp.aslong" pattern="yyyyMMddHHmmssSS'L'" locale="en,US"/>
<format property="build.stamp" pattern="yyyyMMddHHmmss" locale="en,US"/>
<format property="eclipse.build.stamp" pattern="yyyyMMddHHmmss" locale="en,US"/>
<format property="idea.build.stamp" pattern="yyyyMMddHHmmss" locale="en,US"/>
</tstamp>
<!-- version numbers for all packages -->
<property name="build.number.prefix" value="build-"/> <!-- change this for branches, etc. -->
<property name="build.number.string" value="dev"/> <!-- no build numbers for non-prod builds -->
<property name="core.release.base" value="4.4.1"/>
<!-- duplicated version number because @input does not support expressions :( -->
<propertyregex input="4.4.1"
property="core.release.num.sanitised"
regexp="\W+"
replace="_"
global="true" />
<filterset id="common.version.filterset">
<filter token="CLOVER_URL" value="${clover.url}"/>
<filter token="CLOVER_LICENSE_AGREEMENT_URL" value="${clover.license.agreement.url}"/>
<filter token="CLOVER_HELP_URL" value="${clover.help.url}"/>
<filter token="BUILD_DATE" value="${build.date}"/>
<filter token="BUILD_STAMP" value="${build.stamp.aslong}"/>
<filter token="BUILD_NUMBER" value="${build.number.prefix}${build.number.string}"/>
</filterset>
<property name="core.release.qualifier" value=""/>
<property name="core.release.num" value="${core.release.base}${core.release.qualifier}"/>
<property name="ant.release.num" value="${core.release.num}"/>
<loadresource property="core.release.base.ident">
<propertyresource name="core.release.base"/>
<filterchain>
<replacestring from="." to="_" />
</filterchain>
</loadresource>
<propertyregex input="${core.release.base}"
regexp="^([0-9]+\.[0-9]+).*"
select="\1"
property="core.release.major.num"
description="Clover's version number limited to two first major digits, like 4.0"/>
<filterset id="core.version.filterset">
<filterset refid="common.version.filterset"/>
<filter token="CORE_RELEASE_NUM" value="${core.release.num}"/>
<filter token="CORE_RELEASE_MAJOR_NUM" value="${core.release.major.num}"/>
<filter token="CORE_RELEASE_NUM_SANITISED" value="${core.release.num.sanitised}"/>
<filter token="CORE_RELEASE_BASE_IDENT" value="${core.release.base.ident}"/>
</filterset>
<!-- "-dev" by default, add -Declipse.build.suffix= if not a dev build or specify [eclipse|idea].release.num directly -->
<condition property="idea.build.suffix" value="-dev${core.release.qualifier}">
<isfalse value="${clover.prod.build}"/>
</condition>
<condition property="idea.build.suffix" value="">
<istrue value="${clover.prod.build}"/>
</condition>
<condition property="eclipse.build.suffix" value="-dev${core.release.qualifier}">
<isfalse value="${clover.prod.build}"/>
</condition>
<condition property="eclipse.build.suffix" value="">
<istrue value="${clover.prod.build}"/>
</condition>
<property name="eclipse.release.num" value="${core.release.base}.v${eclipse.build.stamp}${eclipse.build.suffix}"/>
<property name="idea.release.num" value="${core.release.base}${idea.build.suffix}"/>
<!-- common resources for release notes -->
<property name="releasenotes.resources.dir"
location="${common.base}/etc/releasenotes/resources"/>
<condition property="windows">
<os family="windows"/>
</condition>
<condition property="unix">
<os family="unix"/>
</condition>
<!-- Conditions checking if we have JDK >= 1.X. Useful for compilation. -->
<condition property="jdk8+" description="We have JDK8 or higher">
<available classname="java.lang.FunctionalInterface"/>
</condition>
<!-- Conditions checking if we have JDK == 1.X. Useful for designing tests for specific platform. -->
<!-- Note: we don't use ${ant.java.version} because currently used Ant version doesn't detect JDK 1.7 -->
<condition property="jdk8" description="We have JDK8 exactly">
<and>
<available classname="java.lang.FunctionalInterface"/>
<not>
<available classname="java.lang.StackWalker"/>
</not>
</and>
</condition>
<condition property="jdk9" description="We have JDK9 exactly">
<available classname="java.lang.StackWalker"/>
</condition>
<property name="junit.jar" location="${build.deps.dir}/junit-4.12.jar"/>
<property name="hamcrest.jar" location="${build.deps.dir}/hamcrest-core-1.3.jar"/>
<property name="multithreadedtc.jar" location="${build.deps.dir}/multithreadedtc-1.01.jar"/>
<property name="mockito.jar" location="${build.deps.dir}/mockito-all-1.10.19.jar"/>
<property name="groovy.jar" location="${build.deps.dir}/groovy-all-${default.groovy.version}.jar"/>
<property name="junit-platform-engine.jar" location="${build.deps.dir}/junit-platform-engine-${junit.platform.version}.jar"/>
<property name="junit-platform-launcher.jar" location="${build.deps.dir}/junit-platform-launcher-${junit.platform.version}.jar"/>
<!-- Compile against minimum supported Spock version TODO using 2.0 because groovy fails trying to load spock services -->
<property name="spock.jar" location="${build.deps.dir}/spock-core-0.7-groovy-2.0.jar"/>
<property name="clover.logging.level" location="info"/> <!-- only 'debug' and 'verbose' will cause logging level to be set -->
<!-- Test patterns -->
<property name="test.includes" value="**/*Test.*,**/*Spec.*"/> <!-- JUnit + Spock -->
<property name="test.excludes" value="**/*FuncTest.*"/>
<property name="func.test.includes" value="**/*FuncTest.*"/>
<property name="func.test.excludes" value=""/>
<!-- Using synchronous IO for artificial Ant unit tests that write data and then immediately try to run it -->
<!-- Also setting large memory requirements as some tests generate lots of in-memory logging -->
<property name="test.fork.jvm.args" value="-Xmx512m -Djava.io.tmpdir=${java.io.tmpdir}"/>
<!--<property name="test.fork.jvm.args" value="-Xmx512m -Djava.io.tmpdir=${java.io.tmpdir} -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>-->
<!--<property name="jvm.args" value="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>-->
<macrodef name="git">
<attribute name="command"/>
<attribute name="params" default=""/>
<attribute name="output" default="${build.dir}/git.output"/>
<sequential>
<echo message="Executing: '${path.to.git} @{command} @{params}' with output in @{output}"/>
<exec executable="${path.to.git}" dir="${common.base}" failonerror="true" output="@{output}">
<arg line="@{command} @{params}"/>
</exec>
</sequential>
</macrodef>
<!-- Macro to fetch ant, ant-junit, ant-junit4 and ant-launcher JARs -->
<macrodef name="get-ant-jars">
<attribute name="version"/>
<attribute name="with-junit4" default="false"/>
<sequential>
<mkdir dir="${build.deps.dir}/ant/ant-@{version}"/>
<get-jar src="org/apache/ant/ant/@{version}/ant-@{version}.jar"
dest="ant/ant-@{version}/ant.jar"/>
<get-jar src="org/apache/ant/ant-junit/@{version}/ant-junit-@{version}.jar"
dest="ant/ant-@{version}/ant-junit.jar"/>
<get-jar src="org/apache/ant/ant-launcher/@{version}/ant-launcher-@{version}.jar"
dest="ant/ant-@{version}/ant-launcher.jar"/>
<if>
<equals arg1="@{with-junit4}" arg2="true"/>
<then>
<get-jar src="org/apache/ant/ant-junit4/@{version}/ant-junit4-@{version}.jar"
dest="ant/ant-@{version}/ant-junit4.jar"/>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="releasepkg">
<attribute name="module"/> <!-- ant, eclipse, idea; will be prefixed with 'clover-' when calling targets -->
<attribute name="kind" default="prod"/>
<sequential>
<ant target="clover-@{module}.prod.build.check"/>
<property name="@{module}.@{kind}.tag" value="@{module}-@{kind}-${@{module}.release.num}"/>
<echo message="@{kind} build for ${@{module}.@{kind}.tag}"/>
<!-- update build number - get the latest revision, rolback any local changes from buildnumber.txt, increment -->
<git command="checkout" params="-- buildnumber.txt"/>
<git command="pull"/>
<buildnumber file="buildnumber.txt"/>
<git command="commit" params="-m "NONE:auto build increment" buildnumber.txt" />
<echo>build.number now ${build.number}</echo>
<!-- build production package -->
<antcall target="clover-@{module}.pkg">
<param name="build.number.string" value="${build.number}"/>
</antcall>
<!-- tag the build -->
<echo message="tagging ${@{module}.@{kind}.tag}"/>
<git command="pull"/>
<git command="tag" params="-f -m'@{kind} ${@{module}.@{kind}.tag}' ${@{module}.@{kind}.tag}"/>
<!-- push changes to master repo; we're pushing directly to master repository on GitHub because
on Bamboo it would push to an agent's repository cache and we'd loose our tag -->
<git command="push ssh://git@github.com/openclover/clover.git"/>
</sequential>
</macrodef>
<target name="mvn.versioncheck">
<!-- Recommended maven versions are 3.0.5 or 3.2.5 -->
<echo message="Checking Maven version ..."/>
<exec executable="${path.to.mvn}" dir="${basedir}" outputproperty="maven.out">
<arg value="-v"/>
</exec>
<fail message="Invalid Maven version. Use 3.0.5 or 3.2.5">
<condition>
<not>
<or>
<contains string="${maven.out}" substring="Apache Maven 3.0.5"/>
<contains string="${maven.out}" substring="Apache Maven 3.2.5"/>
</or>
</not>
</condition>
</fail>
</target>
<target name="prod.mvn.setup"
description="Configure properties for deployment to the OSSRH repository">
<!-- No suffix for production builds-->
<property name="core.release.suffix" value=""/>
<!-- Signing all artefacts -->
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-gpg-plugin:1.4:sign-and-deploy-file"/>
<!-- OSS Sonatype (releases) -->
<property name="maven.repositoryId" value="ossrh"/>
<property name="maven.url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/"/>
</target>
<target name="dev.mvn.setup"
description="Configure properties for deployment to OSSRH Snapshots repository">
<!-- SNAPSHOT suffix for development builds -->
<property name="core.release.suffix" value="-SNAPSHOT"/>
<!-- No signing (it's just a snapshot) -->
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file"/>
<!-- OSS Sonatype (snapshots) -->
<property name="maven.repositoryId" value="ossrh"/>
<property name="maven.url" value="https://oss.sonatype.org/content/repositories/snapshots"/>
</target>
<macrodef name="maven-deploy">
<attribute name="goal"/>
<attribute name="repositoryId"/>
<attribute name="repositoryUrl"/>
<attribute name="file"/>
<attribute name="pomFile"/>
<attribute name="sourcesFile"/>
<attribute name="javadocFile"/>
<sequential>
<echo message="Executing: ${path.to.mvn} @{goal}
-DrepositoryId=@{repositoryId} -Durl=@{repositoryUrl} -DpomFile=@{pomFile} -Dfile=@{file} -Dsources=@{sourcesFile}
-Djavadoc=@{javadocFile} -f @{pomFile}"/>
<!-- Declare <gpg.passphrase> in ~/m2/settings.xml or provide at command line -->
<exec executable="${path.to.mvn}" dir="${basedir}" failonerror="true">
<arg value="@{goal}"/>
<arg value="-DrepositoryId=@{repositoryId}"/>
<arg value="-Durl=@{repositoryUrl}"/>
<arg value="-DpomFile=@{pomFile}"/>
<arg value="-Dfile=@{file}"/>
<arg value="-Dsources=@{sourcesFile}"/>
<arg value="-Djavadoc=@{javadocFile}"/>
<!--<arg value="-Dgpg.passphrase=${gpg.passphrase}"/>-->
<arg value="-f"/>
<arg value="@{pomFile}"/>
</exec>
</sequential>
</macrodef>
<macrodef name="maven-install">
<attribute name="file"/>
<attribute name="pomFile"/>
<attribute name="sourcesFile"/>
<attribute name="javadocFile"/>
<sequential>
<exec executable="${path.to.mvn}" dir="${basedir}" failonerror="true">
<arg value="org.apache.maven.plugins:maven-install-plugin:2.3.1:install-file"/>
<arg value="-DpomFile=@{pomFile}"/>
<arg value="-Dfile=@{file}"/>
<arg value="-Dsources=@{sourcesFile}"/>
<arg value="-Djavadoc=@{javadocFile}"/>
<arg value="-f"/>
<arg value="@{pomFile}"/>
</exec>
</sequential>
</macrodef>
<!--
A macro to fetch given artifact from Maven repository or local cache. Used to fetch from non-anonymous
repository. We call Maven directly becuase a <dependencies> task does not handle
encrypted passwords in settings.xml. Thus we must have this artifact present in a local cache.
See: https://issues.apache.org/jira/browse/MANTTASKS-177
Macro exports an artifact location in the 'groupId:artifactId:packaging' property after resolving.
-->
<macrodef name="maven-resolve">
<!-- input -->
<attribute name="pom" default="${common.base}/pom.xml"/>
<attribute name="groupId"/>
<attribute name="artifactId"/>
<attribute name="version"/>
<attribute name="classifier" default=""/>
<attribute name="packaging" default="jar"/>
<attribute name="pathId" default=""/>
<sequential>
<!-- first call Maven to download artifact from repository -->
<exec executable="${path.to.mvn}" dir="${basedir}" failonerror="true">
<arg value="org.apache.maven.plugins:maven-dependency-plugin:2.10:get"/>
<arg value="-Dartifact=@{groupId}:@{artifactId}:@{version}:@{packaging}:@{classifier}"/>
<arg value="-f"/>
<arg value="@{pom}"/>
</exec>
<!-- next guess file location -->
<local name="groupId.path"/>
<propertyregex input="@{groupId}" regexp="\." replace="/" defaultValue="@{groupId}" property="groupId.path"/>
<local name="artifact.name"/>
<condition property="artifact.name"
value="@{groupId}:@{artifactId}:@{packaging}"
else="@{groupId}:@{artifactId}:@{packaging}:@{classifier}">
<equals arg1="@{classifier}" arg2=""/>
</condition>
<local name="artifact.path"/>
<condition property="artifact.path"
value="${mvn.repository}/${groupId.path}/@{artifactId}/@{version}/@{artifactId}-@{version}.@{packaging}"
else="${mvn.repository}/${groupId.path}/@{artifactId}/@{version}/@{artifactId}-@{version}-@{classifier}.@{packaging}">
<equals arg1="@{classifier}" arg2=""/>
</condition>
<!-- export as a property -->
<echo message="Exporting ${artifact.name}=${artifact.path}"/>
<property name="${artifact.name}" location="${artifact.path}"/>
<!-- export as a path (optional) -->
<if>
<not>
<equals arg1="@{pathId}" arg2=""/>
</not>
<then>
<path id="@{pathId}" location="${artifact.path}"/>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="propertyeval">
<attribute name="name"/>
<attribute name="from"/>
<sequential>
<property name="@{name}" value="${@{from}}"/>
</sequential>
</macrodef>
<target name="common.init" depends="prod.jdk8.build.check">
<mkdir dir="${build.dir}"/>
<!-- Ant -->
<get-ant-jars version="1.7.1"/>
<get-ant-jars version="1.8.4" with-junit4="true"/>
<get-ant-jars version="1.9.14" with-junit4="true"/>
<!-- Groovy -->
<get-jar src="org/codehaus/groovy/groovy-all/${default.groovy.version}/groovy-all-${default.groovy.version}.jar"
dest="groovy-all-${default.groovy.version}.jar"/>
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpath="${groovy.jar}"/>
<!-- JUnit with Hamcrest -->
<get-jar src="junit/junit/4.12/junit-4.12.jar"
dest="junit-4.12.jar"/>
<get-jar src="org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
dest="hamcrest-core-1.3.jar"/>
<!-- Junit 5 -->
<get-jar src="org/junit/jupiter/junit-jupiter-api/${junit.jupiter.version}/junit-jupiter-api-${junit.jupiter.version}.jar"
dest="junit-jupiter-api-${junit.jupiter.version}.jar"/>
<get-jar src="org/junit/jupiter/junit-jupiter-engine/${junit.jupiter.version}/junit-jupiter-engine-${junit.jupiter.version}.jar"
dest="junit-jupiter-engine-${junit.jupiter.version}.jar"/>
<get-jar src="org/junit/jupiter/junit-jupiter-params/${junit.jupiter.version}/junit-jupiter-params-${junit.jupiter.version}.jar"
dest="junit-jupiter-params-${junit.jupiter.version}.jar"/>
<get-jar src="org/junit/platform/junit-platform-engine/${junit.platform.version}/junit-platform-engine-${junit.platform.version}.jar"
dest="junit-platform-engine-${junit.platform.version}.jar"/>
<get-jar src="org/junit/platform/junit-platform-commons/${junit.platform.version}/junit-platform-commons-${junit.platform.version}.jar"
dest="junit-platform-commons-${junit.platform.version}.jar"/>
<get-jar src="org/junit/platform/junit-platform-launcher/${junit.platform.version}/junit-platform-launcher-${junit.platform.version}.jar"
dest="junit-platform-launcher-${junit.platform.version}.jar"/>
<get-jar src="org/opentest4j/opentest4j/${opentest4j.version}/opentest4j-${opentest4j.version}.jar"
dest="opentest4j-${opentest4j.version}.jar"/>
<!-- MultithreadedTC-->
<get-jar src="com/googlecode/multithreadedtc/multithreadedtc/1.01/multithreadedtc-1.01.jar"
dest="multithreadedtc-1.01.jar"/>
<!-- Mockito -->
<get-jar src="org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar"
dest="mockito-all-1.10.19.jar"/>
<!-- Spock -->
<get-jar src="org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.jar"
dest="spock-core-0.7-groovy-2.0.jar"/>
<get-jar src="org/spockframework/spock-core/1.0-groovy-2.0/spock-core-1.0-groovy-2.0.jar"
dest="spock-core-1.0-groovy-2.0.jar"/>
<get-jar src="org/spockframework/spock-core/1.0-groovy-2.3/spock-core-1.0-groovy-2.3.jar"
dest="spock-core-1.0-groovy-2.3.jar"/>
<get-jar src="org/spockframework/spock-core/1.0-groovy-2.4/spock-core-1.0-groovy-2.4.jar"
dest="spock-core-1.0-groovy-2.4.jar"/>
</target>
<property name="clover.db" value="${build.dir}/cloverdb/clover.db"/>
<target name="with.clover">
<taskdef resource="repkgcloverlib.xml" classpath="${repkg.clover.jar}"/>
<clover-setup initstring="${clover.db}">
<fileset dir="${common.base}/clover-ant">
<include name="src/**"/>
</fileset>
<fileset dir="${common.base}/clover-buildutil">
<include name="src/com/atlassian/clover/test/junit/**/*.groovy"/>
</fileset>
<fileset dir="${common.base}/clover-core">
<include name="src/**"/>
<include name="runtime-src/**"/>
</fileset>
<fileset dir="${common.base}/clover-core">
<exclude name="target/src-generated/**"/> <!-- Skip JavaLexer, JavaRecognizer etc -->
</fileset>
<fileset dir="${common.base}/clover-eclipse">
<include name="*/src/**"/>
<include name="*/test/**"/>
</fileset>
<fileset dir="${common.base}/clover-idea">
<include name="src/**"/>
<include name="test/**"/>
<include name="clover-*/src/**"/> <!-- sub-modules -->
</fileset>
<fileset dir="${common.base}/groovy">
<include name="src/**"/>
<include name="src-groovy1/**"/>
<include name="src-groovy2/**"/>
</fileset>
</clover-setup>
</target>
<target name="clover.check">
<clover-check historydir="${clover.historydir}" haltOnFailure="false" initstring="${clover.db}" span="1 day"/>
</target>
<target name="clover.report">
<taskdef resource="repkgcloverlib.xml" classpath="${repkg.clover.jar}"/>
<clover-report initstring="${clover.db}">
<current outfile="${build.dir}/clover" title="Clover Coverage" span="1 day">
<testsources dir="${common.base}/clover-ant" includes="src/test/**"/>
<testsources dir="${common.base}/clover-buildutil" includes="src/com/atlassian/clover/test/junit/**"/>
<testsources dir="${common.base}/clover-core" includes="src/test/**"/>
<testsources dir="${common.base}/clover-eclipse" includes="*/test/**"/>
<testsources dir="${common.base}/clover-idea" includes="test/**"/>
<testsources dir="${common.base}/clover-idea" includes="*/src/test/**"/> <!-- sub-modules -->
<testsources dir="${common.base}/groovy" includes="src/test/**"/>
<format type="html"/>
<columns>
<totalChildren/>
<SUM/>
<filteredElements/>
<avgMethodComplexity/>
<totalPercentageCovered format="longbar"/>
</columns>
</current>
<current outfile="${build.dir}/clover/clover.xml" title="Clover XML" span="1 day">
<format type="xml"/>
</current>
<!--<current outfile="${build.dir}/clover/clover.pdf" title="Clover PDF" span="1 day" summary="true">
<format type="pdf" srcLevel="false"/>
</current>
<current outfile="${build.dir}/clover/json">
<format type="json"/>
</current>-->
</clover-report>
<schemavalidate file="${build.dir}/clover/clover.xml" nonamespacefile="${common.base}/etc/schema/clover.xsd"/>
</target>
<target name="prod.jdk8.build.check">
<fail unless="jdk8+">Build aborting
====================================
THIS PROD BUILD REQUIRES JDK8 OR HIGHER!
====================================
You are using ${java.version}.
</fail>
</target>
</project>