[project name="TestNGTest" default="run" basedir="."]
[!-- Define [testng] task --]
[taskdef name="testng" classname="org.testng.TestNGAntTask"]
[classpath]
[pathelement location="lib/testng-6.8/testng-6.8.jar"/]
[/classpath]
[/taskdef]
[property name="testdir" location="build" /]
[property name="srcdir" location="src" /]
[property name="libdir" location="lib" /]
[property name="full-compile" value="true" /]
[path id="classpath.base"/]
[path id="classpath.build"]
[fileset dir="${libdir}"]
[include name="**/*.jar" /]
[/fileset]
[pathelement location="${testdir}" /]
[pathelement location="${srcdir}" /]
[path refid="classpath.base" /]
[/path]
[target name="clean" ]
[delete verbose="${full-compile}"]
[fileset dir="${testdir}" includes="**/*.class" /]
[/delete]
[/target]
[target name="compile" depends="clean"]
[javac srcdir="${srcdir}" destdir="${testdir}"
verbose="${full-compile}"]
[classpath refid="classpath.build"/]
[/javac]
[/target]
[target name="run" depends="compile"]
[testng outputdir="${testdir}" classpathref="classpath.build"]
[xmlfileset dir="./suites" includes="AllFlows.xml"/]
[/testng]
[/target]
[/project]
run:
[testng] Exception in thread "main" java.util.ServiceConfigurationError: org.testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found
[testng] at java.util.ServiceLoader.fail(Unknown Source)
[testng] at java.util.ServiceLoader.access$300(Unknown Source)
[testng] at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
[testng] at java.util.ServiceLoader$1.next(Unknown Source)
[testng] at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:961)
[testng] at org.testng.TestNG.initializeConfiguration(TestNG.java:896)
[testng] at org.testng.TestNG.run(TestNG.java:1031)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1364)
[testng] at org.testng.TestNG.main(TestNG.java:1333)
[testng] The tests failed.
BUILD SUCCESSFUL
Total time: 4 seconds
I tried your sharing build file but got same problem.
Please let me know if any solution you found.
Thanks