@@ -60,6 +60,11 @@ limitations under the License.
60
60
<pathelement path =" ${ build.main.dir } " />
61
61
<pathelement path =" ${ build.test.dir } " />
62
62
</path >
63
+ <path id =" artifact.classpath" >
64
+ <pathelement path =" ${ build.test.dir } " />
65
+ <pathelement location =" lib/testng-6.3.1.jar" />
66
+ <pathelement location =" ${ artifact.name } " />
67
+ </path >
63
68
64
69
<!-- ******************************************************************* -->
65
70
<!-- Tasks definition -->
@@ -295,13 +300,27 @@ limitations under the License.
295
300
</testng >
296
301
</target >
297
302
298
- <target name =" test-with-artifact" depends =" test-compile" >
303
+ <target name =" test-artifact-compile" >
304
+ <property name =" myclasspath" refid =" artifact.classpath" />
305
+ <!-- Emit the property to the ant console -->
306
+ <echo message =" Classpath = ${ myclasspath } " />
299
307
300
- <path id =" artifact.classpath" >
301
- <pathelement path =" ${ build.test.dir } " />
302
- <pathelement location =" lib/testng-6.3.1.jar" />
303
- <pathelement location =" ${ artifact.name } " />
304
- </path >
308
+ <javac
309
+ srcdir =" src/test"
310
+ destdir =" ${ build.test.dir } "
311
+ optimize =" off"
312
+ deprecation =" off"
313
+ source =" ${ build.conf.javac.source } "
314
+ encoding =" ISO-8859-1"
315
+ fork =" true"
316
+ debug =" on"
317
+ includeantruntime =" false" >
318
+ <classpath refid =" artifact.classpath" />
319
+ <compilerarg value =" -Xlint:all,-rawtypes" />
320
+ </javac >
321
+ </target >
322
+
323
+ <target name =" test-artifact" depends =" test-artifact-compile" >
305
324
306
325
<testng classpathref =" artifact.classpath" outputdir =" ${ test.dir } " listeners =" com.mongodb.util.TestNGListener" haltonfailure =" false" verbose =" 1" >
307
326
<jvmarg value =" -Xmx512M" />
0 commit comments