【问题标题】:Ant failed to build on linuxAnt 无法在 linux 上构建
【发布时间】:2012-08-24 20:41:35
【问题描述】:

我希望有人可以帮助我解决这个问题。 我正在使用 Ant 脚本编译我的 java 代码,但出现以下错误:

[junitreport] Processing /home/sander/workspace/AntIntro/reports/junit/TESTS-TestSuites.xml to /tmp/null1570204945<br />
[junitreport] Loading stylesheet jar:file:/usr/share/eclipse/plugins/org.apache.ant_1.8.2.v20120109-1030/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl<br />
[junitreport] : Error! The first argument to the non-static Java function 'replace' is not a valid object reference.<br />
[junitreport] : Error! Cannot convert data-type 'void' to 'reference'.<br />
[junitreport] : Fatal Error! Could not compile stylesheet<br />
[junitreport] Failed to process /home/sander/workspace/AntIntro/reports/junit/TESTS-TestSuites.xml


我正在使用:
- Eclipse 3.7.2
- OpenJDK 7
- Archlinux x64
- JUnit 4
- 蚂蚁 1.7.2

希望有人能帮帮我,在此先感谢

【问题讨论】:

标签: java linux eclipse ant junit


【解决方案1】:

查看我之前的评论。这是一个已知问题,解决方法是将 apache-ant-1.8.3 与 JDK-7 或 apache-ant-1.8.2 与 JDK-6 一起使用。

【讨论】:

  • 我现在从命令行运行ant,这似乎是解决这个问题的唯一解决方案。
猜你喜欢
  • 1970-01-01
  • 2020-12-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-12-18
  • 1970-01-01
  • 1970-01-01
  • 2018-11-22
相关资源
最近更新 更多