Got the error message: testng doesn't support the "sourcedir" attribute
According to TestNG documentation it definitely does support the "sourcedir" attribute (
http://testng.org/doc/documentation-main.html#running-testng) so I'm very puzzled by this error message.
Here's the relevant section of my build.xml that cause the error message:
<target name="run-tests" depends="test-compile" unless="testng.xml.fileset.run">
<echo message="Running Unit Tests..." />
<echo message="unitTest.failure = ${unitTest.failure}" />
<testng haltonskipped="false" skippedProperty="unitTest.skipped" haltonfailure="false" failureproperty="unitTest.failure" workingDir="${tests.dir}" outputdir="${unit.test.dir}" sourcedir="${testclasses.dir}" groups="${testng.groups}" listeners="${testng.listeners}" timeOut="${testng.timeOut}" dumpCommand="true">
<classpath>
<pathelement path="${classes.dir}" />
<pathelement path="${testclasses.dir}" />
<pathelement path="${bp:run.classpath}" />
<pathelement path="${bp:testrun.classpath}" />
</classpath>
<classfileset dir="${testclasses.dir}">
<include name="**/*Test*.class" />
<exclude name="**/*$$*.class" />
</classfileset>
</testng>
<echo message="unitTest.failure = ${unitTest.failure}" />
<antcall target="testng-junitreport">
</antcall>
<fail message="Common Data Provider Tests Failed">
<condition>
<istrue value="${unitTest.failure}" />
</condition>
</fail>
</target>
Google doesn't give any useful information on this error message:
https://www.google.com/search?q=testng+doesn%27t+support+the+%22sourcedir%22+attribute&ie=utf-8&oe=utf-8#q=testng+doesn%27t+support+the+sourcedir+attributeThere's even a nearly year old question on this exact issue on StackExchange without any answer:
http://stackoverflow.com/questions/30543271/testng-doesnt-support-sourcedir-attribute-errorAnyone has any idea? Thanks!