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

查看:370
本文介绍了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天全站免登陆