2015-03-31 79 views
0

今天我使用的是Fedora 21,我安装了ant编译器,但是当我尝试测试时,会出现这个问题。蚂蚁编译器的问题

[[email protected] practica1]$ ant test 
 
Buildfile: /home/mhernandez/Estructuras de Datos/practica1/build.xml 
 

 
compile.practica1: 
 

 
practica1.jar: 
 

 
test: 
 

 
BUILD FAILED 
 
/home/mhernandez/Estructuras de Datos/practica1/build.xml:63: Problem: failed to create task or type junit 
 
Cause: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found. 
 
     This looks like one of Ant's optional components. 
 
Action: Check that the appropriate optional JAR exists in 
 
     -/usr/share/ant/lib 
 
     -/home/mhernandez/.ant/lib 
 
     -a directory added on the command line with the -lib argument 
 

 
Do not panic, this is a common problem. 
 
The commonest cause is a missing JAR. 
 

 
This is not a bug; it is a configuration problem 
 

 

 
Total time: 0 seconds

的问题是,我不知道如何把失踪罐子该文件夹中。我已经从ant.apache.org下载了.zip文件,并且我拥有所有的jar文件,我只是想将它们放在正确的文件夹中。

+0

尝试将任务罐放入以下目录:“$ HOME/.ant/lib”。请注意,这是ANT输出中提供的位置之一,您可以看到“/home/mhernandez/.ant/lib” – 2015-04-03 06:06:32

回答

0

也许你已经安装了蚂蚁使用yum和有一些jar失踪。由于未更新存储库或下载问题而导致此缺失。

更好的是你可以下载蚂蚁的存档文件。然后解压缩并放置您的电脑的任何位置。然后设置ANT_HOME手动 -

exprot ANT_HOME = /path/where/extracted/archived/placed 
export PATH = $ANT_HOME/bin:$PATH