zoukankan      html  css  js  c++  java
  • ant 生成报告时报错,Errors while applying transformations: Fatal error during transformation

    在使用ant 编译,生成报告时,发现一直报这样一个错,

    [junitreport] Loading stylesheet jar:file:/E:/eclipse/plugins/org.apache.ant_1.8.4.v201303080030/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
    [junitreport] : Error! 非 static Java 函数 'replace' 的第一个参数不是有效的对象引用。
    [junitreport] : Error! 无法将数据类型 'void' 转换为 'reference'。
    [junitreport] : Fatal Error! 无法编译样式表
    [junitreport] Failed to process D:workspace_eppublisherdist	estreportTESTS-TestSuites.xml
    
    BUILD FAILED
    D:workspace_eppublisheruild.xml:128: The following error occurred while executing this line:
    D:workspace_eppublisheruild.xml:136: Errors while applying transformations: Fatal error during transformation

    使用的是 

    Eclipse Kepler +jdk1.7

    发现在使用ant的时候,eclipse 自带的是ant1.8.4版本,但是这个版本和jdk 1.7有冲突,

    还好,替换上新版的ant之后,问题就解决了。

    官网下载ant1.9.4, 调整eclipse 内的 jar时,我们可以单独只取lib下的jar文件,

    调整eclipse下的ant编译jar。window-Preferences-Ant-Runtime-Ant Home Entries(Default),

    删除其中的1.8.4.jar (我这里是全部都Remove了),然后add Extranaljar(不必要将ant导入到项目中),apply保存后,在运行ant,
    ok,已经不报错了。

    多想,多试
  • 相关阅读:
    css !import
    算法
    java web 运动前端
    oauth 2
    js 优化
    js 代码优化 (写的可以)
    2015/08/17 《有两条均线,你应该注意》
    佳能相机操作 EDSDK 教程 C# 版本
    2015/8/14——了2000股,是否正确呢——明天待验证?
    系统架构师考试——程序计数器 PC, 指令寄存器IR、状态寄存器SR、通用寄存器GR
  • 原文地址:https://www.cnblogs.com/junyi0120/p/5519963.html
Copyright © 2011-2022 走看看