Hi all, In my Ant script (see below) I define my own classpath via a <path> element. Within the <junit> target I refer to it via <classpath refid="test.classpath" />. However, JUnit seems to ignore this classpath completely and uses ${java.class.path} only, unless I use <batchtest fork="yes" .... Am I doing something wrong? Is this a bug?
-- Marcel Stör http://www.frightanic.com <project name="LoepaTest_B" default="run_junit_tests"> <!-- This ant task is to run the current Junit-Tests available in the package test --> <!-- The output will be generated in report.tests --> <property name="rootdir" value="C:/workspaces/eclipse/" /> <property name="src.tests" value="${rootdir}/LoepaTest_B/" /> <property name="reports.tests" value="C:/temp/Eahv_B/" /> <property name="ant.home" value="C:/Programme/ApacheGroup/Ant" /> <path id="test.classpath"> <pathelement path="${java.class.path}" /> <pathelement location="${rootdir}/JaXLionBase/" /> <pathelement location="${rootdir}LoepaEahv_B/" /> <pathelement location="${rootdir}LoepaTest_B/" /> <pathelement location="${rootdir}LoepaWebAppEahv_B/WEB-INF/src/" /> <fileset dir="${rootdir}/JaXLionCommonRuntimeLibs/" casesensitive="yes"> <include name="*.jar" /> </fileset> </path> <target name="clean"> <mkdir dir="${reports.tests}" /> <delete> <fileset dir="${reports.tests}"> <include name="TEST-*.xml" /> </fileset> </delete> </target> <target name="run_junit_tests" depends="clean"> <echo message="Information: Die lokal ausgeführten Tests sind nicht die selben wie auf Anthill." /> <echo message="Auf der lokalen Workstation werden aus Zeitgründen nicht alle Tests durchgeführt." /> <echo message="Weitere Tests werden auf dem Build Server ausgeführt und befinden sich im package anthill." /> <junit haltonerror="false" showoutput="true" errorProperty="test.failed" failureProperty="test.failed"> <classpath refid="test.classpath" /> <formatter type="xml" usefile="true" /> <batchtest fork="yes" todir="${reports.tests}"> <fileset dir="${src.tests}"> <include name="test/**/*Test.java" /> <exclude name="**/AllTests.java" /> </fileset> </batchtest> </junit> <junitreport todir="${reports.tests}"> <fileset dir="${reports.tests}"> <include name="TEST-*.xml" /> </fileset> <report format="frames" todir="${reports.tests}/html/" /> </junitreport> <fail if="test.failed"> Unit tests failed. Check log or reports for details. ${reports.tests}html/index.html </fail> </target> </project> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]