【问题标题】:Unable to build on ant 1.9.4无法在 ant 1.9.4 上构建
【发布时间】:2015-03-13 20:11:40
【问题描述】:

我正在尝试使用 ant 1.9.4 构建测试用例。我可以用 1.9.0 构建它们。但是 1.9.4 出现错误(似乎没有配置 junit jar)。 这就是我提到junit jar文件路径的方式。

<property name="junit.home"   location="${basedir}/lib"/>
<filelist dir="${junit.home}"   files="junit4.8.2.jar"/>

注意:我可以使用 amt 1.9.0 进行构建。

我遇到的错误

package org.junit does not exist
import static org.junit.Assert.assertEquals;

【问题讨论】:

    标签: java ant junit


    【解决方案1】:

    您应该将 junit.jar 添加到您的 ant 类路径中。 只需将 junit.jar 文件复制到 ${ANT_HOME}/lib 文件夹即可。

    this 可能重复。

    【讨论】:

      猜你喜欢
      • 2012-08-24
      • 1970-01-01
      • 1970-01-01
      • 2013-07-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多