2015-03-31 121 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