Estoy intentando que ANT cree un informe HTML de una prueba JUNIT en Eclipse, pero después de crear la construcción ANT recibo los siguientes errores cuando lo ejecuto:¡Error! El primer argumento para la función Java no estática 'reemplazar' no es una referencia de objeto válida
[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
¿Qué debo hacer para solucionarlo?
Estas son las secciones de mi build.xml Estoy intentando ejecutar:
<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>
En segundo lugar, ¿cómo deberíamos saber lo que está mal si no pones el código no? –
Después de señalar la compilación ANT al JDK en lugar de JRE, pude obtener el informe HTML. – user1397000
¿Cómo apuntaste la construcción ANT al JDK en lugar de JRE? –