I am hoping there are some people who have seen and have a solution for the problem that I am having right now with ant script. I am using an ant script to compile my java codes in eclipse but eclipse keeps giving me these errors
[junitreport] Processing E:workspaceDataOrchestrationDevelopmentDataOrchestrationLogsjsreportsjunithtmlTESTS-TestSuites.xml to C:Usersu0160235AppDataLocalTemp
ull1503375679
[junitreport] Loading stylesheet jar:file:/E:/software/apache/apache-ant-1.8.2/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 E:workspaceDataOrchestrationDevelopmentDataOrchestrationLogsjsreportsjunithtmlTESTS-TestSuites.xml
BUILD FAILED
E:workspaceDataOrchestrationDevelopmentDataOrchestrationantdeveloperbuild.xml:124: The following error occurred while executing this line:
E:workspaceDataOrchestrationDevelopmentDataOrchestrationantQunitAntScript.xml:20: Errors while applying transformations: Fatal error during transformation
My environment settings:
- Windows 7
- Eclipse 3.6 RC2 32 bit
- JDK 1.6 update 32 32 bit
- Ant 1.7.2
- Junit 4 (within eclipse): in my project jar folder I have junit-dep-4.8.2.jar
One thing to mention that if I compile my codes outside eclipse using the same ant script, everything works just fine, but it doesn't work inside eclipse. I tried to google the errors above the stylesheet above, but that didn't help me much. My guess is somehow, within eclipse different version of junit is being used, but I might be wrong.
See Question&Answers more detail:os