ant junit 任务——在哪里下载 ant-junit.jar 以及把它放在哪里? [英] ant junit task -- where to download ant-junit.jar and where to put it?

查看:30
本文介绍了ant junit 任务——在哪里下载 ant-junit.jar 以及把它放在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的浪费了 2 个小时试图让 ant junit 任务工作.首先,我无法找到 ant-junit.jar 文件,但我设法在 maven 页面中找到了它.之后我把它放在几个地方(~/.ant/lib, /usr/share/ant/lib)但没有运气..我仍然收到这个错误:

I literally wasted 2 hours trying to get ant junit task working. First, I had trouble finding ant-junit.jar file but I managed to find it in a maven page. After that I put it several places(~/.ant/lib, /usr/share/ant/lib) but no luck.. I'm still getting this error:

Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
        This looks like one of Ant's optional components.

所以我在寻找:

  1. 官方网页下载ant junit任务文件
  2. 正确放置该文件的位置.

推荐答案

1. Ant 下载分发

删除的树:

➜  apache-ant-1.9.4  tree lib
lib
├── ant-junit.jar
├── ant-junit4.jar

2.您的测试类路径

就像任何其他测试依赖项一样.

Just like any other test dependency.

(不相关,但发行版不是您要查看的绝对第一地方吗?字面上"我花了五分钟下载、解压缩、查找与 JUnit 相关的文件,并做一个 tar xvf 来检查丢失的类引用.

(Unrelated, but wouldn't the distro be the absolute first place you'd look? It "literally" took me five minutes to download, uncompress, look for the JUnit-related files, and do a tar xvf to sanity-check the missing class ref.)

这篇关于ant junit 任务——在哪里下载 ant-junit.jar 以及把它放在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆