Error! Das erste Argument für die nicht statische Java-Funktion 'replace' ist keine gültige Objektreferenz

Ich versuche, ANT dazu zu bringen, einen HTML-Bericht eines JUNIT-Tests in Eclipse zu erstellen, aber nachdem ich den ANT-Build erstellt habe, werden beim Ausführen die folgenden Fehler angezeigt:

[junitreport] Processing C:\Documents and Settings\Administrator\workspace\Home\junit\TESTS-TestSuites.xml to C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\null785926900
[junitreport] Loading stylesheet jar:file:/C:/ANT/apache-ant-1.8.3/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] : Error! The first argument to the non-static Java function 'replace' is not a valid object reference.
[junitreport] : Error! Cannot convert data-type 'void' to 'reference'.
[junitreport] : Fatal Error! Could not compile stylesheet
[junitreport] Failed to process C:\Documents and Settings\Administrator\workspace\Home\junit\TESTS-TestSuites.xml

Was muss ich tun, um dies zu beheben?

Hier sind die Abschnitte meiner Build.xml, die ich ausführen möchte:

<target name="Home">
    <mkdir dir="${junit.output.dir}"/>
    <junit fork="yes" printsummary="withOutAndErr">
        <formatter type="xml"/>
        <test name="Home" todir="${junit.output.dir}"/>
        <classpath refid="Home.classpath"/>
    </junit>
</target>
<target name="junitreport">
    <junitreport todir="${junit.output.dir}">
        <fileset dir="${junit.output.dir}">
            <include name="TEST-*.xml"/>
        </fileset>
        <report format="frames" todir="${junit.output.dir}"/>
    </junitreport>
</target>

Antworten auf die Frage(7)

Ihre Antwort auf die Frage