forked from simplegeo/cobertura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
658 lines (577 loc) · 22.8 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
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
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
<?xml version="1.0" encoding="UTF-8"?>
<project name="cobertura" default="coverage" basedir="." xmlns:cobertura="antlib:net.sourceforge.cobertura.ant">
<description>
Cobertura - http://cobertura.sourceforge.net/
The copyright for this program is retained by its contributors
See the included COPYRIGHT file for a complete list of contributors
Cobertura is licensed under the GNU General Public License
Cobertura comes with ABSOLUTELY NO WARRANTY
</description>
<property file="build.properties" />
<!-- Import the Cobertura Ant Library -->
<property name="cobertura.local.library" location="antLibrary" />
<import file="${cobertura.local.library}/library.xml" />
<path id="base.path">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${jetty.dir}">
<include name="lib/servlet-api*.jar" />
</fileset>
</path>
<path id="cobertura.classpath">
<pathelement location="cobertura.jar" />
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<macrodef name="cobertura-taskdef">
<sequential>
<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
<!--
This is probably a bug in Eclipse, but the Eclipse ant
editor seems to lock the classpath of the last taskdef,
so we do a taskdef of one of the core ant tasks so that
cobertura.jar does not become locked.
-->
<taskdef name="not-used" classname="org.apache.tools.ant.taskdefs.Delete">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
</taskdef>
</sequential>
</macrodef>
<target name="init">
<!-- Insert our version number in a file. -->
<filter token="version" value="${version}" />
<copy file="${etc.dir}/plugin.xml" todir="${build.dir}" filtering="true" overwrite="true" />
</target>
<target name="compile" depends="init">
<mkdir dir="${build.classes.dir}" />
<javac fork="true" srcdir="${src.dir}" destdir="${build.classes.dir}" debug="true" encoding="UTF-8"
target="${javac.target}">
<compilerarg value="-Xlint:unchecked" compiler="javac1.5"/>
<classpath location="${build.classes.dir}" />
<classpath refid="base.path" />
</javac>
<mkdir dir="${build.otherclasses.dir}" />
<javac fork="true" srcdir="${othersrc.dir}" destdir="${build.otherclasses.dir}" debug="true" encoding="UTF-8"
target="${javac.target}">
<compilerarg value="-Xlint:unchecked" compiler="javac1.5"/>
<classpath location="${build.classes.dir}" />
<classpath refid="base.path" />
</javac>
<mkdir dir="${build.functionalconditiontest.dir}" />
<javac fork="true" srcdir="${examples.functionalconditiontest.dir}" destdir="${build.functionalconditiontest.dir}" debug="true" encoding="UTF-8"
target="${javac.target}">
<compilerarg value="-Xlint:unchecked" compiler="javac1.5"/>
<classpath location="${build.classes.dir}" />
<classpath refid="base.path" />
</javac>
<!-- Copy jar resources (css, images, log4j property file, etc.) -->
<copy todir="${build.classes.dir}">
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="compile-tests" depends="init,compile,cobertura-groovy-init">
<mkdir dir="${build.test.classes.dir}" />
<cobertura:groovyc srcdir="${test.src.dir}" destdir="${build.test.classes.dir}" encoding="UTF-8">
<classpath location="${build.classes.dir}" />
<classpath location="${build.test.classes.dir}" />
<classpath refid="base.path" />
<classpath location="${build.otherclasses.dir}" />
<classpath location="${build.functionalconditiontest.dir}" />
<classpath path="${java.class.path}"/>
<javac debug="true" encoding="UTF-8" >
<compilerarg value="-Xlint:unchecked" compiler="javac1.5"/>
</javac>
</cobertura:groovyc>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="jar" depends="init,compile">
<mkdir dir="${build.dist.dir}" />
<!-- the standard jar for Cobertura -->
<jar jarfile="${basedir}/${ant.project.name}.jar" compress="true">
<fileset dir="${build.classes.dir}">
<include name="**/*.class" />
</fileset>
<fileset dir="${etc.dir}">
<include name="log4j.properties" />
<include name="tasks.properties" />
</fileset>
<fileset dir="${src.dir}">
<exclude name="**/*.java" />
<exclude name="**/package.html" />
</fileset>
<fileset dir="${basedir}">
<include name="COPYING" />
<include name="COPYRIGHT" />
<include name="README" />
</fileset>
<manifest>
<attribute name="Specification-Title" value="${description}"/>
<attribute name="Specification-Vendor" value="Cobertura"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="${description}"/>
<attribute name="Implementation-Vendor" value="Cobertura"/>
<attribute name="Implementation-Vendor-Id" value="net.sourceforge.cobertura"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
<!--
Eclipse needs the ANT tasks and the runtime of Cobertura to be split into
separate jars, otherwise lots of bad things happen in eclipse to do with
class loading.
-->
<mkdir dir="${build.dist.eclipse.dir}" />
<jar jarfile="${build.dist.eclipse.dir}/${ant.project.name}.jar">
<fileset dir="${build.classes.dir}">
<include name="net/sourceforge/cobertura/ant/**/*.class" />
</fileset>
<fileset dir="${etc.dir}">
<include name="tasks.properties" />
</fileset>
<manifest>
<attribute name="Specification-Title" value="${description}"/>
<attribute name="Specification-Vendor" value="Cobertura"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="${description}"/>
<attribute name="Implementation-Vendor" value="Cobertura"/>
<attribute name="Implementation-Vendor-Id" value="net.sourceforge.cobertura"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
<jar jarfile="${build.dist.eclipse.dir}/${ant.project.name}-main.jar">
<fileset dir="${build.classes.dir}">
<exclude name="net/sourceforge/cobertura/ant/**/*.class" />
</fileset>
<fileset dir="${etc.dir}">
<include name="log4j.properties" />
<include name="tasks.properties" />
</fileset>
<manifest>
<attribute name="Specification-Title" value="${description}"/>
<attribute name="Specification-Vendor" value="Cobertura"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Implementation-Title" value="${description}"/>
<attribute name="Implementation-Vendor" value="Cobertura"/>
<attribute name="Implementation-Vendor-Id" value="net.sourceforge.cobertura"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
</target>
<target name="war" depends="cobertura-groovy-init">
<cobertura:groovy>
//load buildUtil definitions
evaluate(new File("buildUtil.groovy"))
buildWar(new File("coberturaFlush.war"))
</cobertura:groovy>
</target>
<target name="instrument" depends="jar">
<delete file="${basedir}/cobertura.ser" />
<delete file="${build.dir}/cobertura.ser" /> <!-- TODO: Is this needed? -->
<cobertura-taskdef />
<cobertura-instrument datafile="${build.dir}/cobertura.ser" todir="${build.instrumented.dir}">
<fileset dir="${build.classes.dir}">
<include name="**/*.class" />
<exclude name="**/*Test.class" />
<exclude name="net/sourceforge/cobertura/javancss/**/*.class" />
</fileset>
<fileset dir="${build.otherclasses.dir}">
<include name="**/*.class" />
<exclude name="**/*Test.class" />
</fileset>
</cobertura-instrument>
</target>
<!--
This target is used when testing both instrumented and
non-instrumented code. The net.sourceforge.cobertura.datafile
sysproperty is only used if we're testing instrumented code.
-->
<target name="test" depends="compile-tests">
<delete dir="${build.reports.dir}/junit-xml" failonerror="false" />
<delete dir="${test.work.dir}" failonerror="false" />
<mkdir dir="${build.reports.dir}/junit-xml" />
<junit fork="true" forkmode="once" haltonfailure="false" failureProperty="test.failed" printsummary="true" timeout="900000">
<sysproperty key="net.sourceforge.cobertura.datafile" file="${build.dir}/cobertura.ser" />
<sysproperty key="basedir" value="${basedir}"/>
<jvmarg value="-Xmx512M" />
<!--
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y" />
-->
<classpath location="${build.test.classes.dir}" />
<classpath location="${build.instrumented.dir}" />
<classpath location="${build.classes.dir}" />
<classpath location="${build.otherclasses.dir}" />
<classpath location="${etc.dir}" />
<classpath refid="base.path" />
<classpath refid="cobertura.common.local.library" />
<classpath>
<fileset dir="${java.home}/../">
<include name="lib/tools.jar"/>
</fileset>
</classpath>
<formatter type="xml" />
<formatter type="plain" usefile="false" />
<test name="${testcase}" todir="${build.reports.dir}/junit-xml" if="testcase" />
<batchtest todir="${build.reports.dir}/junit-xml" unless="testcase">
<fileset dir="${build.test.classes.dir}">
<include name="**/*Test.class" />
<exclude name="test/first/Test.class" />
<exclude name="test/condition/Test.class" />
</fileset>
</batchtest>
</junit>
<delete dir="${build.reports.dir}/junit-html" failonerror="false" />
<mkdir dir="${build.reports.dir}/junit-html" />
<junitreport todir="${build.reports.dir}/junit-html">
<fileset dir="${build.reports.dir}/junit-xml">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${build.reports.dir}/junit-html" />
</junitreport>
</target>
<target name="coverage-report">
<cobertura-taskdef />
<delete dir="${build.reports.dir}/coverage-html" failonerror="false" />
<mkdir dir="${build.reports.dir}/coverage-html" />
<cobertura-report datafile="${build.dir}/cobertura.ser"
destdir="${build.reports.dir}/coverage-html"
format="html"
>
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
<fileset dir="${othersrc.dir}">
<include name="**/*.java" />
</fileset>
</cobertura-report>
<delete dir="${build.reports.dir}/coverage-xml" />
<mkdir dir="${build.reports.dir}/coverage-xml" />
<cobertura-report datafile="${build.dir}/cobertura.ser"
destdir="${build.reports.dir}/coverage-xml"
format="xml"
>
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
<fileset dir="${othersrc.dir}">
<include name="**/*.java" />
</fileset>
</cobertura-report>
</target>
<!--
<target name="format">
<property name="dir.jalopy" value="${lib.dir}/jalopy" />
<taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
<classpath>
<fileset dir="${dir.jalopy}">
<include name="*.jar" />
</fileset>
</classpath>
</taskdef>
<jalopy fileformat="unix"
convention="etc/jalopy.xml"
loglevel="info"
classpathref="base.path">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
<fileset dir="${test.src.dir}">
<include name="**/*.java" />
</fileset>
</jalopy>
</target>
-->
<target name="javadoc">
<delete dir="${build.api.dir}" />
<mkdir dir="${build.api.dir}" />
<javadoc access="private" author="true" breakiterator="true" destdir="${build.api.dir}" failonerror="true" encoding="UTF-8" linksource="true" serialwarn="false" version="true" windowtitle="Cobertura API">
<fileset dir="${src.dir}">
<include name="**/*.java" />
</fileset>
<classpath location="${ant.home}/lib/ant.jar" />
<classpath refid="base.path" />
</javadoc>
</target>
<target name="dist" depends="jar,javadoc">
<!--
Copy the files needed for the binary jar to a clean directory
tree. The "binary" jar contains the minimum files needed to
use Cobertura.
-->
<copy-unix-scripts todir="${build.dist.dir}/package-bin/cobertura-${version}" />
<copy todir="${build.dist.dir}/package-bin/cobertura-${version}">
<fileset dir="${basedir}">
<include name="ChangeLog" />
<include name="cobertura-*.bat" />
<include name="COPYING" />
<include name="COPYRIGHT" />
<include name="README" />
<include name="lib/**" />
<!-- Exclude jars that are only used by the JUnit tests -->
<exclude name="lib/jaxen*" />
<exclude name="lib/jdom*" />
<exclude name="lib/junit*" />
<exclude name="lib/xerces/**" />
<exclude name="lib/xalan*" />
<include name="cobertura.jar" />
<include name="coberturaFlush.war" />
<include name="examples/basic/README" />
<include name="examples/basic/build.properties" />
<include name="examples/basic/*.xml" />
<include name="examples/basic/src/**" />
</fileset>
</copy>
<!--
Copy the files needed for the source jar to a clean directory
tree. The "source" jar contains everything needed to build
Cobertura.
-->
<copy-unix-scripts todir="${build.dist.dir}/package-src/cobertura-${version}" />
<copy todir="${build.dist.dir}/package-src/cobertura-${version}">
<fileset dir="${basedir}">
<include name="antLibrary/**" />
<include name="ChangeLog" />
<include name="cobertura-*.bat" />
<include name="COPYING" />
<include name="COPYRIGHT" />
<include name="README" />
<include name="build.properties" />
<include name="build.xml" />
<include name="etc/**" />
<include name="lib/**" />
<include name="resources/**" />
<include name="src/**" />
<include name="src-2/**" />
<include name="test/**" />
<include name="examples/*/README" />
<include name="examples/*/build.properties" />
<include name="examples/*/*.xml" />
<include name="examples/*/src/**" />
</fileset>
</copy>
<!-- Create bz2 files -->
<create-tar basedir="${build.dist.dir}/package-bin" destfile="${ant.project.name}-${version}-bin.tar.bz2" compression="bzip2"/>
<create-tar basedir="${build.dist.dir}/package-src" destfile="${ant.project.name}-${version}-src.tar.bz2" compression="bzip2"/>
<!-- Create gz files -->
<create-tar basedir="${build.dist.dir}/package-bin" destfile="${ant.project.name}-${version}-bin.tar.gz" compression="gzip"/>
<create-tar basedir="${build.dist.dir}/package-src" destfile="${ant.project.name}-${version}-src.tar.gz" compression="gzip"/>
<!-- Create zip files -->
<create-zip basedir="${build.dist.dir}/package-bin" destfile="${ant.project.name}-${version}-bin.zip"/>
<create-zip basedir="${build.dist.dir}/package-src" destfile="${ant.project.name}-${version}-src.zip"/>
<!-- Make an Eclipse plugin zip -->
<!--<zip destfile="${ant.project.name}-${version}-eclipse-plugin.zip" encoding="UTF-8">
<zipfileset prefix="com.${ant.project.name}_${version}" dir="${basedir}">
<include name="ChangeLog" />
<include name="COPYING" />
<include name="COPYRIGHT" />
<include name="README" />
<include name="lib/**" />
</zipfileset>
<zipfileset prefix="com.${ant.project.name}_${version}" dir="${build.dist.eclipse.dir}">
<include name="${ant.project.name}.jar" />
<include name="${ant.project.name}-main.jar" />
</zipfileset>
<zipfileset prefix="com.${ant.project.name}_${version}" dir="${etc.dir}">
<include name="plugin.properties" />
</zipfileset>
<zipfileset prefix="com.${ant.project.name}_${version}" dir="${build.dir}">
<include name="plugin.xml" />
</zipfileset>
</zip>
-->
</target>
<macrodef name="copy-unix-scripts">
<attribute name="todir" />
<sequential>
<copy todir="@{todir}">
<fileset dir="${basedir}">
<include name="cobertura-*.sh" />
</fileset>
<!-- remove windows carriage returns from unix scripts -->
<filterchain>
<fixcrlf eof="remove" eol="unix"/>
</filterchain>
</copy>
</sequential>
</macrodef>
<macrodef name="create-zip">
<attribute name="basedir" />
<attribute name="destfile" />
<sequential>
<zip destfile="@{destfile}" encoding="UTF-8">
<zipfileset dir="@{basedir}" filemode="755">
<include name="*.sh"/>
</zipfileset>
<zipfileset dir="@{basedir}">
<exclude name="*.sh"/>
</zipfileset>
</zip>
</sequential>
</macrodef>
<macrodef name="create-tar">
<attribute name="basedir" />
<attribute name="destfile" />
<attribute name="compression" />
<sequential>
<tar destfile="@{destfile}" compression="@{compression}">
<tarfileset dir="@{basedir}" mode="755">
<include name="*.sh"/>
</tarfileset>
<tarfileset dir="@{basedir}">
<exclude name="*.sh"/>
</tarfileset>
</tar>
</sequential>
</macrodef>
<target name="create-bundles" depends="jar,javadoc">
<mkdir dir="${build.bundle.dir}" />
<delete>
<fileset dir="${build.bundle.dir}">
<include name="*" />
</fileset>
</delete>
<mkdir dir="${build.bundle.source.dir}" />
<mkdir dir="${build.bundle.runtime.dir}" />
<!-- the javadoc jar for Cobertura.
used by IDE, maven, and global artifact repository. -->
<jar jarfile="${build.bundle.source.dir}/${ant.project.name}-${version}-javadoc.jar" compress="true">
<fileset dir="${build.api.dir}">
<include name="**/*" />
</fileset>
<fileset dir="${basedir}">
<include name="COPYING" />
<include name="COPYRIGHT" />
<include name="README" />
</fileset>
<manifest>
<attribute name="Cobertura" value="Javadoc for ${version}"/>
</manifest>
</jar>
<!-- the sources jar for Cobertura.
this is not the same as the -src.tar.gz, and is not expected to be
a fully compilable source jar.
This jar should contain the source for the classes that exist in
the cobertura.jar file, and is used from within an IDE to aide
in debugging of an application that utilizes that jar file.
This is an optional jar file for the global repository. -->
<jar jarfile="${build.bundle.source.dir}/${ant.project.name}-${version}-sources.jar" compress="true">
<fileset dir="${src.dir}">
<include name="**/*" />
</fileset>
<fileset dir="${basedir}">
<include name="COPYING" />
<include name="COPYRIGHT" />
<include name="README" />
</fileset>
<manifest>
<attribute name="Cobertura" value="Source for ${version}"/>
</manifest>
</jar>
<!-- copy existing files into expected and versioned names -->
<copy file="COPYING" tofile="${build.bundle.source.dir}/LICENSE.txt"
overwrite="true" />
<copy file="${ant.project.name}.jar"
tofile="${build.bundle.source.dir}/${ant.project.name}-${version}.jar"
overwrite="true" />
<!-- Create the bundle for the cobertura lib -->
<copy file="${basedir}/maven/ibiblio/cobertura.pom"
tofile="${build.bundle.source.dir}/pom.xml"
overwrite="true">
<filterset>
<filter token="VERSION" value="${version}" />
</filterset>
</copy>
<!--
This bundle jar is only used if the new release is manually uploaded to the
maven repository.
-->
<jar jarfile="${basedir}/${ant.project.name}-${version}-bundle.jar" compress="false">
<fileset dir="${build.bundle.source.dir}">
<include name="LICENSE.txt" />
<include name="${ant.project.name}-${version}.jar" />
<include name="${ant.project.name}-${version}-javadoc.jar" />
<include name="${ant.project.name}-${version}-sources.jar" />
<include name="pom.xml" />
</fileset>
</jar>
<!-- Create the bundle for the cobertura-runtime -->
<copy file="${basedir}/maven/ibiblio/cobertura-runtime.pom"
tofile="${build.bundle.runtime.dir}/pom.xml"
overwrite="true">
<filterset>
<filter token="VERSION" value="${version}" />
</filterset>
</copy>
<copy file="COPYING" tofile="${build.bundle.runtime.dir}/LICENSE.txt"
overwrite="true" />
<jar jarfile="${basedir}/${ant.project.name}-runtime-${version}-bundle.jar" compress="false">
<fileset dir="${build.bundle.runtime.dir}">
<include name="LICENSE.txt" />
<include name="pom.xml" />
</fileset>
</jar>
</target>
<target name="deploy-to-local-maven-repo-only" depends="cobertura-groovy-init">
<cobertura:groovy>
//load buildUtil definitions
evaluate(new File("buildUtil.groovy"))
deployToLocalMavenRepo()
</cobertura:groovy>
</target>
<target name="install-eclipse-plugin">
<apply dir="${eclipse.dir}/plugins" executable="unzip">
<arg value="-o" />
<fileset dir="dist">
<include name="${ant.project.name}-${version}-eclipse-plugin.zip" />
</fileset>
</apply>
</target>
<target name="clean" description="Remove all files created by the build process.">
<delete dir="${build.dir}" />
<delete>
<fileset dir="${basedir}">
<include name="cobertura.jar" />
<include name="cobertura-*-bundle.jar" />
<include name="cobertura.ser" />
<include name="cobertura.ser.lock" />
<include name="cobertura-*-bin.*" />
<include name="cobertura-*-src.*" />
<include name="cobertura-*-eclipse-plugin.zip" />
<include name="coberturaFlush.war" />
</fileset>
</delete>
</target>
<target name="failure-check">
<fail message="JUnit tests failed" if="test.failed" />
</target>
<target name="cobertura-check">
<cobertura-check datafile="${build.dir}/cobertura.ser"
totalbranchrate="70"
totallinerate="80" />
</target>
<!--
Used in merging new versions of javancss into Cobertura. See
javancss/coberturaREADME.txt for details.
-->
<target name="javancss-merge" depends="cobertura-groovy-init">
<cobertura:groovy>
//load buildUtil definitions
evaluate(new File("buildUtil.groovy"))
mergeJavancss()
</cobertura:groovy>
</target>
<target name="coverage" depends="compile,compile-tests,instrument,test,coverage-report,failure-check,cobertura-check" description="Compile, instrument ourself, run the tests and generate JUnit and coverage reports." />
<target name="release" depends="clean,compile,compile-tests,test,failure-check,jar,war,javadoc,dist,create-bundles,deploy-to-local-maven-repo-only" description="Full build cycle, producing a distribution." />
</project>
<!--
vim: et sts=4 sw=4 noexpandtab
-->