forked from oracle/opengrok
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
1164 lines (1032 loc) · 53.4 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
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!--
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
See LICENSE.txt included in this distribution for the specific
language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at LICENSE.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]
CDDL HEADER END
Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
-->
<project name="OpenGrok" default="jar" basedir="." xmlns:jacoco="antlib:org.jacoco.ant">
<description>Builds, tests, and runs the project opengrok.</description>
<property name="build.sysclasspath" value="ignore"/>
<property file="${user.home}/config/ant/${ant.project.name}.properties" />
<property file="${user.home}/config/ant/global.properties" />
<import file="nbproject/build-impl.xml"/>
<import file="nbproject/profiler-build-impl.xml"/> <!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="opengrok-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<property name="version" value="1.1-rc16"/>
<property name="distname" value="opengrok"/>
<property name="src.dir" location="src"/>
<property name="src.generatedsrc.dir" location="generatedsrc"/>
<property name="tardest" value="${distname}-${version}.tar.gz"/>
<property name="findbugs.home" value="${user.home}/.ant/lib/findbugs"/>
<property name="checkstyle.home" value="${user.home}/.ant/lib/checkstyle"/>
<property name="pmd.home" value="${user.home}/.ant/lib/pmd"/>
<property name="test.repositories" value="testdata/repositories"/>
<property name="test.sources" value="testdata/sources"/>
<property name="test.plugins" value="testdata/plugins"/>
<property name="test.cvs" value="${test.repositories}/cvs_test"/>
<property name="test.cvs.repo" value="${test.cvs}/cvsrepo"/>
<property name="test.cvs.root" value="${test.cvs}/cvsroot"/>
<property name="test.hg" value="${test.repositories}/mercurial"/>
<property name="test.bk" value="${test.repositories}/bitkeeper"/>
<property name="test.bzr" value="${test.repositories}/bazaar"/>
<property name="test.git" value="${test.repositories}/git"/>
<property name="test.svn" value="${test.repositories}/svn"/>
<property name="test.razor" value="${test.repositories}/razor"/>
<property name="test.plugins_jar" value="${test.plugins}/plugins.jar"/>
<property name="mvn.repository" value="http://repo1.maven.org/maven2"/>
<property name="jflex-version" value="1.6.1"/>
<path id="lib.search.path">
<pathelement path="${user.home}/.ant/lib"/>
<pathelement path="${java.class.path}"/>
<pathelement path="lib"/>
<pathelement path="../lib"/>
<pathelement location="lib/jflex-${jflex-version}.jar"/>
</path>
<path id="jacoco.lib.search.path">
<pathelement path="${jacoco.home}/lib"/>
<pathelement path="${java.class.path}"/>
<pathelement path="lib/jacoco/lib"/>
</path>
<path id="findbugs.lib.search.path">
<pathelement path="${findbugs.home}/lib/"/>
<pathelement path="${java.class.path}"/>
<pathelement path="lib/findbugs/lib/"/>
</path>
<path id="checkstyle.lib.search.path">
<pathelement path="${checkstyle.home}/"/>
<pathelement path="${java.class.path}"/>
</path>
<path id="pmd.lib.search.path">
<pathelement path="${pmd.home}/lib/"/>
<pathelement path="${java.class.path}"/>
</path>
<target name="get-java-version">
<condition property="java.version.checked">
<or>
<equals arg1="${ant.java.version}" arg2="1.8"/>
<equals arg1="${ant.java.version}" arg2="9"/>
</or>
</condition>
</target>
<target name="check-java-version" depends="get-java-version" unless="java.version.checked">
<fail message="Unsupported Java version: ${ant.java.version}. Make sure that the Java version is 1.8 or greater."/>
</target>
<target name="-check-jflex" description="Check that jflex jar file is present">
<available file="jflex-${jflex-version}.jar" type="file" property="JFlex.present">
<filepath refid="lib.search.path"/>
</available>
<condition property="jflex_not_downloaded">
<not>
<isset property="JFlex.present"/>
</not>
</condition>
</target>
<target name="download-jflex" depends="-check-jflex" if="jflex_not_downloaded">
<get src="${mvn.repository}/de/jflex/jflex/${jflex-version}/jflex-${jflex-version}.jar"
dest="lib/jflex-${jflex-version}.jar" verbose="true" usetimestamp="true"/>
</target>
<target name="jflex" depends="download-jflex">
<taskdef classname="jflex.anttask.JFlexTask" name="jflex" classpathref="lib.search.path" />
<mkdir dir="${src.generatedsrc.dir}"/>
<macrodef name="run-jflex">
<attribute name="name"/>
<attribute name="dir"/>
<sequential> <!-- Name of input has to be .lex -->
<jflex file="${src.dir}/@{dir}/@{name}.lex" destdir="${src.generatedsrc.dir}" nobak="on" inputstreamctor="false"/>
</sequential>
</macrodef>
<!--
DON'T forget to SYNC below with opengrok-indexer/pom.xml !!!
-->
<macrodef name="run-jflex-and-disable-buffer-expansion">
<attribute name="name"/>
<attribute name="dir"/>
<sequential>
<jflex file="${src.dir}/@{dir}/@{name}.lex" destdir="${src.generatedsrc.dir}" nobak="on" inputstreamctor="false"/>
<!-- LUCENE-5897: Disallow scanner buffer expansion -->
<replaceregexp file="${src.generatedsrc.dir}/@{dir}/@{name}.java"
match="[ \t]*/\* is the buffer big enough\? \*/\s+if \(zzCurrentPos >= zzBuffer\.length.*?\}[ \t]*\r?\n"
replace="" flags="s" />
<replaceregexp file="${src.generatedsrc.dir}/@{dir}/@{name}.java"
match="private static final int ZZ_BUFFERSIZE ="
replace="private int ZZ_BUFFERSIZE ="/>
<replaceregexp file="${src.generatedsrc.dir}/@{dir}/@{name}.java"
match="int requested = zzBuffer\.length - zzEndRead;"
replace="int requested = zzBuffer.length - zzEndRead - zzFinalHighSurrogate;"/>
<!-- <replaceregexp file="${src.generatedsrc.dir}/@{dir}/@{name}.java"
match="(zzFinalHighSurrogate = 1;)(\r?\n)"
replace="\1\2 if (totalRead == 1) { return true; }\2"/> this only works for jflex 1.6.0 -->
<replaceregexp file="${src.generatedsrc.dir}/@{dir}/@{name}.java"
match="(zzFinalHighSurrogate = 1;)(\r?\n)"
replace="\1\2 if (numRead == 1) { return true; }\2"/>
<!-- also revert 0 character check that got in with 1.6.1 : https://github.com/jflex-de/jflex/blob/master/jflex/examples/zero-reader/README.md -->
<replaceregexp file="${src.generatedsrc.dir}/@{dir}/@{name}.java"
match="[ \t]*/\* not supposed to occur according to specification of java\.io\.Reader \*/\s+if \(numRead == 0.*?\}[ \t]*\r?\n"
replace="" flags="s" />
</sequential>
</macrodef>
<!-- NOTE: run-jflex-and-disable-buffer-expansion will fix #1170 https://github.com/OpenGrok/OpenGrok/issues/1170 make parsers stop producing tokens > 32766 chars
If a language needs more than 2048 utf8 or 1024 utf16 chars in one token, we need to use below in its lex file:
%buffer "size" - Set the initial size of the scan buffer to the specified value (decimal, in bytes). The default value is 16384.
or add setters similar as in https://issues.apache.org/jira/secure/attachment/12663628/LUCENE-5897.patch
and allow configuration to override this
(note that lucene uses 1024*1024 (1Mb) as default value which equals 32766 utf16 chars per token and is max limit of lucene as of 25.1.2017)
-->
<property name="gen.analysis.dir" value="/org/opensolaris/opengrok/analysis"/>
<run-jflex dir="${gen.analysis.dir}/c" name="CSymbolTokenizer" />
<run-jflex dir="${gen.analysis.dir}/c" name="CXref"/>
<run-jflex dir="${gen.analysis.dir}/c" name="CxxSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/c" name="CxxXref"/>
<run-jflex dir="${gen.analysis.dir}/erlang" name="ErlangSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/erlang" name="ErlangXref"/>
<run-jflex dir="${gen.analysis.dir}/fortran" name="FortranSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/fortran" name="FortranXref"/>
<run-jflex dir="${gen.analysis.dir}/golang" name="GolangSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/golang" name="GolangXref"/>
<run-jflex dir="${gen.analysis.dir}/haskell" name="HaskellSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/haskell" name="HaskellXref"/>
<!-- java tokenizer is below and has disabled buffer -->
<run-jflex dir="${gen.analysis.dir}/java" name="JavaXref"/>
<!-- js tokenizer is below and has disabled buffer -->
<run-jflex dir="${gen.analysis.dir}/javascript" name="JavaScriptXref"/>
<run-jflex dir="${gen.analysis.dir}/lua" name="LuaSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/lua" name="LuaXref"/>
<run-jflex dir="${gen.analysis.dir}/powershell" name="PowershellSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/powershell" name="PowershellXref"/>
<run-jflex dir="${gen.analysis.dir}/python" name="PythonSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/python" name="PythonXref"/>
<run-jflex dir="${gen.analysis.dir}/rust" name="RustSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/rust" name="RustXref"/>
<run-jflex dir="${gen.analysis.dir}/perl" name="PerlSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/perl" name="PerlXref"/>
<run-jflex dir="${gen.analysis.dir}/php" name="PhpSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/php" name="PhpXref"/>
<run-jflex dir="${gen.analysis.dir}/lisp" name="LispSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/lisp" name="LispXref"/>
<run-jflex dir="${gen.analysis.dir}/tcl" name="TclSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/tcl" name="TclXref"/>
<run-jflex dir="${gen.analysis.dir}/scala" name="ScalaSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/scala" name="ScalaXref"/>
<!-- Kotlin tokenizer is below and has disabled buffer -->
<run-jflex dir="${gen.analysis.dir}/kotlin" name="KotlinXref"/>
<!-- Swift tokenizer is below and has disabled buffer -->
<run-jflex dir="${gen.analysis.dir}/swift" name="SwiftXref"/>
<!-- Swift tokenizer is below and has disabled buffer -->
<run-jflex dir="${gen.analysis.dir}/json" name="JsonXref"/>
<!-- just those 4 below will not increase buffer size beyond lucene token limits -->
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/plain" name="PlainFullTokenizer"/>
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/plain" name="PlainSymbolTokenizer"/>
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/javascript" name="JavaScriptSymbolTokenizer"/>
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/java" name="JavaSymbolTokenizer"/>
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/kotlin" name="KotlinSymbolTokenizer"/>
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/swift" name="SwiftSymbolTokenizer"/>
<run-jflex-and-disable-buffer-expansion dir="${gen.analysis.dir}/json" name="JsonSymbolTokenizer"/>
<!-- old analysers that will produce tokens > 32766 chars, since they have the buffer increase code in -->
<!--
<run-jflex dir="${gen.analysis.dir}/plain" name="PlainFullTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/plain" name="PlainSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/javascript" name="JavaScriptSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/java" name="JavaSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/kotlin" name="KotlinSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/swift" name="SwiftSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/swift" name="JsonSymbolTokenizer"/>
-->
<run-jflex dir="${gen.analysis.dir}/plain" name="PlainXref"/>
<run-jflex dir="${gen.analysis.dir}/plain" name="XMLXref"/>
<run-jflex dir="${gen.analysis.dir}/sql" name="SQLXref"/>
<run-jflex dir="${gen.analysis.dir}/sql" name="PLSQLXref"/>
<run-jflex dir="${gen.analysis.dir}/document" name="TroffXref"/>
<run-jflex dir="${gen.analysis.dir}/document" name="TroffFullTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/sh" name="ShSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/sh" name="ShXref"/>
<run-jflex dir="${gen.analysis.dir}/vb" name="VBSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/vb" name="VBXref"/>
<run-jflex dir="${gen.analysis.dir}/csharp" name="CSharpSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/csharp" name="CSharpXref"/>
<run-jflex dir="${gen.analysis.dir}/clojure" name="ClojureSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/clojure" name="ClojureXref"/>
<run-jflex dir="${gen.analysis.dir}/uue" name="UuencodeXref"/>
<run-jflex dir="${gen.analysis.dir}/uue" name="UuencodeFullTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/pascal" name="PascalSymbolTokenizer"/>
<run-jflex dir="${gen.analysis.dir}/pascal" name="PascalXref"/>
<property name="gen.context.dir" value="/org/opensolaris/opengrok/search/context"/>
<run-jflex dir="${gen.context.dir}" name="HistoryLineTokenizer"/>
<run-jflex dir="${gen.context.dir}" name="PlainLineTokenizer"/>
</target>
<property name="git" value="git"/>
<!-- Get the id of the changeset we're building from using a
git command.
-->
<target name="-get-changeset-from-command"
depends="-check-is-git-repo" if="build.from.repo">
<exec executable="${git}"
failifexecutionfails="no"
outputproperty="changeset">
<arg value="rev-parse"/>
<arg value="HEAD"/>
</exec>
</target>
<!-- Check if we build from a checked out copy of the repository,
so that we have history information from git available.
-->
<target name="-check-is-git-repo">
<available property="build.from.repo" file=".git" type="dir"/>
</target>
<target name="-check-is-archived-git-repo">
<available property="build.from.archived.repo"
file=".git_archival.txt"
type="file"/>
</target>
<!-- Get the id of the changeset we're building from by reading
.git_archival.txt file created by git archive. This will only
be used when we're not building from a checked out copy of
the repository, for example the source distribution.
-->
<target name="-get-changeset-from-file"
depends="-check-is-archived-git-repo" if="build.from.archived.repo">
<tempfile property="git.archival.temp" deleteonexit="true"/>
<copy file=".git_archival.txt" tofile="${git.archival.temp}"/>
<replaceregexp file="${git.archival.temp}" flags="s"
match=".*node: ([0-9a-f]{12}).*"
replace="\1"/>
<loadfile srcFile="${git.archival.temp}" property="changeset"/>
</target>
<target name="-set-changeset" unless="changeset">
<property name="changeset" value="unknown"/>
</target>
<target name="-update-build-info"
depends="-get-changeset-from-command,-get-changeset-from-file,-set-changeset">
<mkdir dir="${build.classes.dir}/org/opensolaris/opengrok"/>
<propertyfile
file="${build.classes.dir}/org/opensolaris/opengrok/info.properties">
<entry key="version" value="${version}"/>
<entry key="changeset" value="${changeset}"/>
</propertyfile>
</target>
<property name="coverage.dir" value="${basedir}/coverage"/>
<target name="-pre-compile" depends="check-java-version,jrcs,jflex,download-lucene,download-servlet-api"/>
<target name="eclipse" depends="-pre-compile"
description="satisfy eclipse dependencies"/>
<target name="-post-clean">
<delete dir="${src.generatedsrc.dir}"/>
<delete file="${manifest.file}"/>
<delete dir="${coverage.dir}"/>
<antcall target="-delete-generated-repository-files"/>
</target>
<!--
Create an empty manifest file so that nbproject/build-impl.xml
notices that a manifest should be added to the jar file
-->
<target name="-touch-manifest">
<!-- no attributes, main-class and class-path will be added later -->
<manifest file="manifest.mf" mode="replace"/>
</target>
<!-- injecting jacoco, too -->
<target name="-pre-init" depends="-touch-manifest, -set-jacocoagent"/>
<!--
Initialize a property holding a list of jar files on which
opengrok.jar depends
-->
<target name="-post-init">
<pathconvert property="opengrok.lib.files" pathsep=" ">
<path>
<pathelement path="${javac.classpath}"/>
</path>
<flattenmapper/>
<map from="" to="lib/"/>
</pathconvert>
<mkdir dir="${build.test.classes.dir}"/>
<mkdir dir="${build.dir}/src/jsp"/>
</target>
<!-- Update the manifest file with a classpath attribute -->
<target name="-update-manifest-classpath">
<manifest file="${manifest.file}" mode="update">
<attribute name="Class-Path"
value="${opengrok.lib.files}"/>
</manifest>
</target>
<target name="-pre-jar" depends="-update-manifest-classpath,-update-build-info"/>
<!--
Copy the jars from lib to dist/lib manually if we don't have
the copylibs task from NetBeans
-->
<target name="-copy-lib-without-netbeans"
unless="manifest.available+main.class+mkdist.available">
<copy todir="${dist.dir}/lib">
<fileset file="${file.reference.ant.jar}"/>
</copy>
<copy todir="${dist.dir}">
<fileset dir="." includes="${opengrok.lib.files}"/>
</copy>
</target>
<path id="plainlib.search.path">
<pathelement path="lib"/>
<pathelement path="../lib"/>
</path>
<target name="-check-lucene" description="Check that lucene jar files are present">
<available file="${lucene-core.jar}" type="file" property="lucene-core.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-analyzers-common.jar}" type="file" property="lucene-analyzers-common.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-queryparser.jar}" type="file" property="lucene-queryparser.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<available file="${lucene-suggest.jar}" type="file" property="lucene-suggest.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<condition property="lucene_not_downloaded">
<not>
<and>
<isset property="lucene-core.jar.present"/>
<isset property="lucene-analyzers-common.jar.present"/>
<isset property="lucene-queryparser.jar.present"/>
<isset property="lucene-suggest.jar.present"/>
</and>
</not>
</condition>
</target>
<target name="download-lucene" depends="-check-lucene" if="lucene_not_downloaded">
<delete>
<fileset dir="lib">
<include name="lucene-*.jar"/>
</fileset>
</delete>
<get src="${mvn.repository}/org/apache/lucene/lucene-core/${lucene.version}/${lucene-core.jar}"
dest="lib/${lucene-core.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-analyzers-common/${lucene.version}/${lucene-analyzers-common.jar}"
dest="lib/${lucene-analyzers-common.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-queryparser/${lucene.version}/${lucene-queryparser.jar}"
dest="lib/${lucene-queryparser.jar}" verbose="true" usetimestamp="true"/>
<get src="${mvn.repository}/org/apache/lucene/lucene-suggest/${lucene.version}/${lucene-suggest.jar}"
dest="lib/${lucene-suggest.jar}" verbose="true" usetimestamp="true"/>
</target>
<target name="-check-servlet-api" description="Check that servlet-api jar file is present">
<available file="${servlet-api.jar}" type="file" property="servlet-api.jar.present">
<filepath refid="plainlib.search.path"/>
</available>
<condition property="servlet-api_not_downloaded">
<not>
<isset property="servlet-api.jar.present"/>
</not>
</condition>
</target>
<target name="download-servlet-api" depends="-check-servlet-api" if="servlet-api_not_downloaded">
<delete>
<fileset dir="lib">
<include name="servlet-api-*.jar"/>
</fileset>
</delete>
<get src="${mvn.repository}/javax/servlet/servlet-api/${servlet-api.version}/${servlet-api.jar}"
dest="lib/${servlet-api.jar}" verbose="true" usetimestamp="true"/>
</target>
<target name="-post-jar" depends="-copy-lib-without-netbeans, sample-plugins">
<war destfile="${dist.war}" webxml="web/WEB-INF/web.xml">
<fileset dir="web" excludes="META-INF/context.xml"/>
<lib dir="${dist.dir}" includes="opengrok.jar"/>
<lib dir="${dist.dir}/lib" includes="*.jar" excludes="${servlet-api.jar}"/>
</war>
<echo message="Generating man page.."/>
<java classname="org.opensolaris.opengrok.index.Indexer"
output="${dist.dir}/opengrok.1" failonerror="true" fork="true">
<arg value="--man" />
<classpath>
<pathelement location="dist/opengrok.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</target>
<target name="-check-svr4-package" description="Check that Solaris SVR4 package exists">
<!-- XXX dist should be ${dist.dir} -->
<available file="dist/OSOLopengrok-${version}.pkg" type="file"
property="svr4_package_exists">
</available>
<condition property="svr4_package_missing">
<not>
<isset property="svr4_package_exists"/>
</not>
</condition>
</target>
<target name="package-svr4" depends="-check-svr4-package,jar" if="svr4_package_missing">
<exec os="SunOS" executable="/usr/bin/pkgmk" failonerror="true">
<arg line="-o -d build -r . -v ${version} -f platform/solaris/pkgdef/prototype"/>
</exec>
<exec os="SunOS" executable="/usr/bin/pkgtrans" failonerror="true">
<arg line="-s build ../dist/OSOLopengrok-${version}.pkg OSOLopengrok"/>
</exec>
</target>
<target name="-check-ips-package" description="Check that Solaris IPS package exists">
<!-- XXX dist should be ${dist.dir} -->
<available file="dist/opengrok-${version}.p5p" type="file"
property="ips_package_exists">
</available>
<condition property="ips_package_missing">
<not>
<isset property="ips_package_exists"/>
</not>
</condition>
</target>
<target name="package-ips" depends="-check-ips-package,jar" if="ips_package_missing">
<exec os="SunOS" executable="platform/solaris/ips/create.sh" failonerror="true">
<arg line="-v ${version}"/>
</exec>
</target>
<target name="package" depends="package-svr4,package-ips">
</target>
<target name="dist" depends="jar">
<tar destfile="${dist.dir}/${tardest}"
compression="gzip">
<tarfileset dir="." prefix="${distname}-${version}/doc">
<include name="README.txt"/>
<include name="CHANGES.txt"/>
<include name="LICENSE.txt"/>
<include name="NOTICE.txt"/>
<include name="paths.tsv"/>
<include name="logging.properties"/>
</tarfileset>
<tarfileset dir="." prefix="${distname}-${version}/bin" mode="555">
<include name="OpenGrok"/>
</tarfileset>
<tarfileset dir="tools" prefix="${distname}-${version}/bin/" mode="555">
<include name="Messages"/>
<include name="Groups"/>
</tarfileset>
<tarfileset dir="tools/sync" prefix="${distname}-${version}/bin/" mode="555">
<include name="sync.py"/>
<include name="command.py"/>
<include name="commands.py"/>
<include name="reindex-project.ksh"/>
</tarfileset>
<tarfileset dir="doc" prefix="${distname}-${version}/doc">
<include name="EXAMPLE.txt"/>
<include name="ctags.config"/>
</tarfileset>
<tarfileset dir="${dist.dir}" prefix="${distname}-${version}/lib">
<include name="opengrok.jar"/>
<include name="source.war"/>
<include name="lib/*"/>
<exclude name="lib/${servlet-api.jar}"/>
</tarfileset>
<tarfileset dir="${dist.dir}" prefix="${distname}-${version}/man/man1">
<include name="opengrok.1"/>
</tarfileset>
</tar>
</target>
<target name="dist-src" depends="init">
<mkdir dir="${dist.dir}"/>
<echo message="Creating archive for tag ${version}"/>
<exec executable="${git}">
<arg value="archive"/>
<!--<arg value="-v"/>-->
<arg value="--prefix=${distname}-${version}-src/"/>
<arg value="-o${dist.dir}/${distname}-${version}-src.zip"/>
<arg value="${version}"/>
</exec>
<echo message="If above succeeds, output is in ${dist.dir}/${distname}-${version}-src.zip"/>
</target>
<target name="-check_findbugs" description="Check that findbugs jar files are present">
<available file="findbugs.jar" type="file" property="findbugs.jar.present">
<filepath refid="findbugs.lib.search.path"/>
</available>
<fail unless="findbugs.jar.present" message="Please install Findbugs findbugs.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
<available file="findbugs-ant.jar" type="file" property="findbugs-ant.jar.present">
<filepath refid="findbugs.lib.search.path"/>
</available>
<fail unless="findbugs-ant.jar.present" message="Please install Findbugs findbugs-ant.jar in ~/.ant/lib-directory (or in ant classpath) to run Findbugs, see README"/>
</target>
<target name="findbugs" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate HTML output">
<path id="findbugs.lib" >
<pathelement location="${findbugs.home}/lib/findbugs.jar"/>
<pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
<mkdir dir="findbugs"/>
<findbugs projectname="OpenGrok" home="${findbugs.home}" output="html" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.html" jvmargs="-Xmx512m">
<auxClasspath>
<fileset dir="${dist.dir}/lib/">
<include name="*.jar"/>
</fileset>
</auxClasspath>
<sourcePath path="${src.dir}"/>
<sourcePath path="${src.generatedsrc.dir}"/>
<class location="${dist.dir}/opengrok.jar" />
</findbugs>
</target>
<target name="findbugs-xml" depends="jar, -check_findbugs" description="Runs Findbugs on the OpenGrok source code and generate XML output">
<path id="findbugs.lib" >
<pathelement location="${findbugs.home}/lib/findbugs.jar"/>
<pathelement location="${findbugs.home}/lib/findbugs-ant.jar"/>
</path>
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpathref="findbugs.lib"/>
<mkdir dir="findbugs"/>
<findbugs projectname="OpenGrok" home="${findbugs.home}" output="xml" excludeFilter="tools/findbugs_filter.xml" outputFile="findbugs/findbugs.xml" jvmargs="-Xmx512m">
<auxClasspath>
<fileset dir="${dist.dir}/lib/">
<include name="*.jar"/>
</fileset>
</auxClasspath>
<sourcePath path="${src.dir}"/>
<sourcePath path="${src.generatedsrc.dir}"/>
<class location="${dist.dir}/opengrok.jar" />
</findbugs>
</target>
<target name="-check_checkstyle" description="Check that checkstyle jar files are present">
<available file="checkstyle-all.jar" type="file" property="checkstyle.jar.present">
<filepath refid="checkstyle.lib.search.path"/>
</available>
<fail unless="checkstyle.jar.present" message="Please install checkstyle-all.jar in lib-directory (or in ant classpath) to run Checkstyle, see README."/>
</target>
<target name="checkstyle" depends="compile, -check_checkstyle" description="Run checkstyle on OpenGrok source code">
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties" classpath="${checkstyle.home}/checkstyle-all.jar"/>
<checkstyle config="checkstyle/style.xml" failOnViolation="false">
<fileset dir="src" includes="**/*.java"/>
<fileset dir="test" includes="**/*.java"/>
<formatter type="plain"/>
<formatter type="plain" toFile="checkstyle/checkstyle_errors.txt"/>
<formatter type="xml" toFile="checkstyle/checkstyle_errors.xml"/>
</checkstyle>
</target>
<target name="-check_pmd" description="Check that pmd jar files are present">
<available file="${pmd.home}/lib" type="dir" property="pmd-lib.present">
<filepath refid="pmd.lib.search.path"/>
</available>
<fail unless="pmd-lib.present" message="Please point pmd.home to proper directory to run PMD, see README."/>
</target>
<path id="pmd.lib" >
<fileset followsymlinks="false" dir="${pmd.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="pmd" depends="compile, -check_pmd" description="Run PMD on OpenGrok source code">
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.lib"/>
<mkdir dir="pmd"/>
<pmd failuresPropertyName="pmd.num.warnings" rulesetfiles="tools/pmd_ruleset.xml">
<sourcelanguage name="java" version="${javac.source}" />
<formatter type="html" toFile="pmd/pmd_report.html"/>
<formatter type="xml" toFile="pmd/pmd_report.xml"/>
<fileset dir="src" includes="**/*.java"/>
<!-- <fileset dir="test" includes="**/*.java"/> -->
<!-- <fileset dir="web" includes="**/*.jsp"/>
<fileset dir="web" includes="**/*.jspf"/> -->
</pmd>
<echo message="PMD finished, found ${pmd.num.warnings} warnings, see pmd/pmd_report.html"/>
</target>
<target name="cpd-xml" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code, print output in xml">
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.lib"/>
<cpd minimumTokenCount="100" format="xml" outputFile="pmd/cpd_report.xml">
<fileset dir="src">
<include name="**/*.java"/>
</fileset>
<fileset dir="test">
<include name="**/*.java"/>
</fileset>
</cpd>
</target>
<target name="cpd" depends="compile, -check_pmd" description="Run CPD on OpenGrok source code">
<taskdef name="cpd" classname="net.sourceforge.pmd.cpd.CPDTask" classpathref="pmd.lib"/>
<cpd minimumTokenCount="100" outputFile="pmd/cpd_report.txt">
<fileset dir="src">
<include name="**/*.java"/>
</fileset>
<fileset dir="test">
<include name="**/*.java"/>
</fileset>
</cpd>
</target>
<target name="-check_jacoco" description="Check that jacoco jar files are present">
<available file="jacocoant.jar" type="file" property="jacocoant.jar.present">
<filepath refid="jacoco.lib.search.path"/>
</available>
<fail unless="jacocoant.jar.present" message="Please install jacocoant.jar in lib-directory (or in ant classpath) to run Jacoco, see README."/>
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="jacoco.lib.search.path"/>
</target>
<property name="jacoco_out" value="jacoco.exec"/>
<target name="-set-jacocoagent" if="jacoco">
<antcall target="-check_jacoco"/>
<jacoco:agent property="jacocoagent" includes="org.opensolaris.*" excludes="org.opensolaris.opengrok.management.client.*:org.apache.*" destfile="${jacoco_out}"/>
<!-- Ugly hack to leverage IDE variable to inject jacoco
this will most probably break once Netbeans folks will drop this variable!
-->
<property name="run.jvmargs.ide" value="${jacocoagent}" />
<echo level="warn" message="Jacoco agent was enabled and injected to run.jvmargs.ide"/>
</target>
<target name="jacocoreport" depends="-check_jacoco,-jacocoreport-without-test" />
<target name="jacoco-code-coverage" depends="clean, test, jacocoreport" description="Make jacoco test code coverage reports based on the OpenGrok unit tests" if="jacoco"/>
<target name="-jacocoreport-without-test"> <!--depends="-set-jacocoagent"> -->
<jacoco:report>
<executiondata>
<file file="${jacoco_out}"/>
</executiondata>
<structure name="Opengrok">
<classfiles>
<fileset dir="build/classes">
<exclude name="**/org/opensolaris/opengrok/management/client/*.class" />
</fileset>
</classfiles>
<sourcefiles encoding="UTF-8">
<fileset dir="src"/>
</sourcefiles>
</structure>
<html destdir="jacoco"/>
<csv destfile="jacoco/report.csv"/>
<xml destfile="jacoco/report.xml"/>
</jacoco:report>
</target>
<target name="-pre-compile-test"><!-- depends="-set-jacocoagent"> -->
</target>
<!-- <target name="-pre-compile-test-single" depends="-set-jacocoagent"/> -->
<target name="check_repositories_zip" description="check if repositories.zip was generated">
<available
file="${build.test.classes.dir}/org/opensolaris/opengrok/history/repositories.zip"
type="file" property="repos_exists">
</available>
<condition property="repos_missing">
<not>
<isset property="repos_exists"/>
</not>
</condition>
</target>
<target name="check_plugins_jar" description="check if plugins.jar was generated">
<available
file="${build.test.classes.dir}/org/opensolaris/opengrok/authorization/plugins.jar"
type="file" property="plugins_exists">
</available>
<condition property="plugins_missing">
<not>
<isset property="plugins_exists" />
</not>
</condition>
</target>
<target depends="create_repos, create_plugins" name="-post-compile-test">
</target>
<target depends="create_repos, create_plugins" name="-post-compile-test-single">
</target>
<target depends="check_plugins_jar" name="create_plugins" if="plugins_missing">
<copy
file="${test.plugins_jar}"
tofile="${build.test.classes.dir}/org/opensolaris/opengrok/authorization/plugins.jar" />
</target>
<target depends="check_repositories_zip" name="create_repos" if="repos_missing">
<antcall target="-create-svn-repository"/>
<antcall target="-create-razor-repository"/>
<!-- Change root in CVS test repository -->
<!-- Strange indentation in line two levels below to get newline correctly -->
<!-- This will be changed again in the CVS tests -->
<concat destfile="${test.cvs.repo}/CVS/Root" append="no" force="yes" eol="unix">${basedir}/${test.cvs.root}/
</concat>
<!-- Generate ZIP files used for unit testing git/.git are renamed -->
<copy todir="${test.git}/.git">
<fileset dir="${test.git}/git"/>
</copy>
<!-- Generate ZIP files used for unit testing mercurial/.hg and mercurial/.hgignore are renamed -->
<copy todir="${test.hg}/.hg">
<fileset dir="${test.hg}/hg"/>
</copy>
<copy file="${test.hg}/hgignore" tofile="${test.hg}/.hgignore"/>
<!-- Generate ZIP files used for unit testing bitkeeper/.bk are renamed -->
<copy todir="${test.bk}/.bk">
<!--
The bk directory contains SCCS subdirectory which we want to
include so disable default excludes.
-->
<fileset dir="${test.bk}/bk" defaultexcludes="no"/>
</copy>
<!-- Generate ZIP files used for unit testing bzr/.bzr are renamed -->
<copy todir="${test.bzr}/.bzr">
<fileset dir="${test.bzr}/bzr"/>
</copy>
<zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/index/source.zip"
basedir="${test.sources}"
update="false"
defaultexcludes="no"/>
<zip destfile="${build.test.classes.dir}/org/opensolaris/opengrok/history/repositories.zip"
basedir="${test.repositories}"
excludes="mercurial/hg/**, mercurial/hgignore, git/git/**, bitkeeper/bk/**, bazaar/bzr/**"
update="false"
defaultexcludes="no"/>
<antcall target="-delete-generated-repository-files"/>
</target>
<target name="-create-svn-repository">
<delete dir="${test.svn}"/>
<delete dir="${build.test.reposroots}/svn"/>
<mkdir dir="${build.test.reposroots}"/>
<exec executable="svnadmin" failifexecutionfails="false">
<arg value="create"/>
<arg value="${build.test.reposroots}/svn"/>
</exec>
<!-- need absolute path for svn url -->
<pathconvert property="test.svn.url">
<map from="" to="file://"/>
<path location="${build.test.reposroots}/svn"/>
</pathconvert>
<exec executable="svn" failifexecutionfails="false">
<arg value="import"/>
<arg value="${test.sources}"/>
<arg value="${test.svn.url}"/>
<arg value="-m"/>
<arg value="Initial import"/>
</exec>
<!-- Unit test for issue #694 -->
<exec executable="svn" failifexecutionfails="false">
<arg value="checkout"/>
<arg value="${test.svn.url}"/>
<arg value="${build.test.reposroots}/svn-working"/>
</exec>
<mkdir dir="${build.test.reposroots}/svn-working/parent"/>
<mkdir dir="${build.test.reposroots}/svn-working/parent/module1"/>
<mkdir dir="${build.test.reposroots}/svn-working/parent/module2"/>
<touch file="${build.test.reposroots}/svn-working/parent/module1/file1.txt"/>
<touch file="${build.test.reposroots}/svn-working/parent/module1/file2.txt"/>
<exec executable="svn" failifexecutionfails="false" dir="${build.test.reposroots}/svn-working">
<arg value="add"/>
<arg value="parent"/>
</exec>
<exec executable="svn" failifexecutionfails="false" dir="${build.test.reposroots}/svn-working">
<arg value="commit"/>
<arg value="-m"/>
<arg value="files in 2 modules"/>
</exec>
<!-- move the file1 from module1 to module2, and commit to finish our test case -->
<exec executable="svn" failifexecutionfails="false" dir="${build.test.reposroots}/svn-working">
<arg value="move"/>
<arg value="parent/module1/file1.txt"/>
<arg value="parent/module2"/>
</exec>
<exec executable="svn" failifexecutionfails="false" dir="${build.test.reposroots}/svn-working">
<arg value="commit"/>
<arg value="-m"/>
<arg value="move file1.txt from module1 to module2"/>
</exec>
<delete dir="${build.test.reposroots}/svn-working"/>
<!-- end of unit test for issue #694 -->
<exec executable="svn" failifexecutionfails="false">
<arg value="checkout"/>
<arg value="${test.svn.url}"/>
<arg value="${test.svn}"/>
</exec>
</target>
<target name="-create-razor-repository">
<delete dir="${test.razor}"/>
<copy todir="${test.razor}/Razor-Simple">
<fileset dir="ext/SampleRazorRepository/UserSandbox"/>
</copy>
<copy todir="${test.razor}/Razor-Simple/SimpleCProgram/.razor">
<fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
</copy>
<!--
The support for binaries in Razor repositories is not fully
functional, so the next copy target is commented out for now.
-->
<!--copy todir="${test.razor}/Razor-Simple/SimpleCProgram-BinaryRelease/.razor">
<fileset dir="ext/SampleRazorRepository/Repository/OpenGrokSample/RAZOR_UNIVERSE/DOMAIN_01/Simple"/>
</copy-->
</target>
<!-- clean up generated test repositories -->
<target name="-delete-generated-repository-files">
<delete dir="${test.bk}/.bk"/>
<delete dir="${test.bzr}/.bzr"/>
<delete dir="${test.hg}/.hg"/>
<delete file="${test.hg}/.hgignore"/>
<delete dir="${test.git}/.git"/>
<delete dir="${test.svn}"/>
<delete dir="${test.razor}"/>
<delete file="${test.cvs.repo}/CVS/Root"/>
</target>
<target name="jdepend" depends="compile" description="Run JDepend dependency checking">
<mkdir dir="jdepend"/>
<java classname="jdepend.xmlui.JDepend" failonerror="true" fork="true">
<arg value="-file"/>
<arg value="jdepend/report.xml"/>
<arg value="${build.classes.dir}"/>
<classpath>
<pathelement location="${user.home}/.ant/lib/jdepend/lib/jdepend.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
<java classname="jdepend.textui.JDepend" failonerror="true" fork="true">
<arg value="-file"/>
<arg value="jdepend/report.txt"/>
<arg value="${build.classes.dir}"/>
<classpath>
<pathelement location="${user.home}/.ant/lib/jdepend/lib/jdepend.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
</target>
<!-- Generate HTML test report -->
<target depends="init" name="test-report">
<junitreport todir="${build.test.results.dir}">
<fileset dir="${build.test.results.dir}">
<include name="TEST-*.xml"/>
</fileset>
<report todir="${build.test.results.dir}"/>
</junitreport>