@@ -17,6 +17,7 @@ limitations under the License.
17
17
-->
18
18
19
19
<project name =" MongoDB Java Driver" default =" compile" basedir =" ." >
20
+ <property environment =" env" />
20
21
21
22
<property file =" build.properties" prefix =" build.conf" />
22
23
@@ -28,6 +29,8 @@ limitations under the License.
28
29
<property name =" testdir" location =" ${ targetdir } /test" />
29
30
<dirname property =" javabase" file =" ${ java.home } " />
30
31
32
+ <property name =" clover.jar" location =" ${ env.CLOVER_HOME } /lib/clover.jar" />
33
+ <taskdef resource =" cloverlib.xml" classpath =" ${ clover.jar } " />
31
34
<path id =" classpath" >
32
35
<fileset dir =" lib" ><include name =" **/*.jar" /></fileset >
33
36
<pathelement path =" conf" />
@@ -36,6 +39,15 @@ limitations under the License.
36
39
<pathelement path =" ${ javabase } /lib/tools.jar" />
37
40
</path >
38
41
42
+ <path id =" classpath.clover" >
43
+ <fileset dir =" lib" ><include name =" **/*.jar" /></fileset >
44
+ <pathelement path =" conf" />
45
+ <pathelement path =" build/main" />
46
+ <pathelement path =" build/test" />
47
+ <pathelement path =" ${ javabase } /lib/tools.jar" />
48
+ <pathelement path =" ${ clover.jar } " />
49
+ </path >
50
+
39
51
<!-- ******************************************************************* -->
40
52
<!-- The init target. -->
41
53
<!-- ******************************************************************* -->
@@ -235,17 +247,6 @@ limitations under the License.
235
247
</testng >
236
248
</target >
237
249
238
- <target name =" bamboo-test" depends =" compile,guard.noclover" >
239
- <testng classpathref =" classpath" outputdir =" ${ testdir } " listeners =" com.mongodb.util.TestNGListener, com.cenqua.clover.tasks.testng.CloverOptimizedTestSelector" haltonfailure =" false" >
240
- <jvmarg value =" -Xmx512M" />
241
- <xmlfileset dir =" ." includes =" testng.xml" />
242
- </testng >
243
- <clover-report >
244
- <current outfile =" coverage.xml" >
245
- <format type =" xml" />
246
- </current >
247
- </clover-report >
248
- </target >
249
250
250
251
<target name =" test-single" depends =" compile" >
251
252
<condition property =" propsSpecified" >
@@ -312,26 +313,44 @@ limitations under the License.
312
313
<!-- The reporting targets -->
313
314
<!-- ******************************************************************* -->
314
315
315
- <target name =" junit-reports" depends =" test" >
316
+ <target name =" junit-reports" depends =" compile" >
317
+ <testng classpathref =" classpath" outputdir =" ${ testdir } " listeners =" com.mongodb.util.TestNGListener" haltonfailure =" false" >
318
+ <jvmarg value =" -Xmx512M" />
319
+ <xmlfileset dir =" ." includes =" testng.xml" />
320
+ </testng >
316
321
<junitreport todir =" ${ testdir } " >
317
322
<fileset dir =" ${ testdir } " ><include name =" */*.xml" /></fileset >
318
323
<report format =" noframes" todir =" ${ testdir } " />
319
324
</junitreport >
320
325
</target >
321
326
322
- <!-- NOTE: publish-local is now located in maven/ -->
323
- <taskdef resource =" cloverlib.xml" classpath =" lib/clover-3.1.0.jar" />
324
-
325
- <target name =" -check.clover" >
326
- <available property =" clover.installed" classname =" com.cenqua.clover.CloverInstr" />
327
- </target >
328
-
327
+
328
+
329
+ <target name =" -check.clover" >
330
+ <available property =" clover.installed" classname =" com.cenqua.clover.CloverInstr" />
331
+ </target >
332
+
329
333
<target name =" with.clover" depends =" guard.noclover" >
330
334
<clover-setup />
331
335
</target >
332
-
333
- <target name =" guard.noclover" depends =" -check.clover" unless =" clover.installed" >
334
- <fail message =" The target you are attempting to run requires Clover, which doesn't appear to be installed" />
335
- </target >
336
+
337
+ <target name =" guard.noclover" depends =" -check.clover" unless =" clover.installed" >
338
+ <fail message =" The target you are attempting to run requires Clover, which doesn't appear to be installed" />
339
+ </target >
340
+
341
+ <target name =" jenkins-test" depends =" with.clover,compile" >
342
+
343
+ <testng classpathref =" classpath.clover" outputdir =" ${ testdir } " listeners =" com.mongodb.util.TestNGListener, com.cenqua.clover.tasks.testng.CloverOptimizedTestSelector" haltonfailure =" false" verbose =" 1" >
344
+ <jvmarg value =" -Xmx512M" />
345
+ <xmlfileset dir =" ." includes =" testng.xml" />
346
+ </testng >
347
+ <clover-report >
348
+ <current outfile =" coverage.xml" >
349
+ <format type =" xml" />
350
+ </current >
351
+ </clover-report >
352
+ </target >
353
+
354
+ <!-- NOTE: publish-local is now located in maven/ -->
336
355
337
356
</project >
0 commit comments