编译Ant时JUnit的问题

来源:互联网 发布:运营商封80端口 编辑:程序博客网 时间:2024/05/21 15:44

在编译Ant源码时出现了以下错误:

BUILD FAILED
/tmp/apache-ant-1.8.2/build.xml:986: The following error occurred while executing this line:
/tmp/apache-ant-1.8.2/build.xml:778: We cannot build the test jar unless JUnit is present,
      as JUnit is needed to compile the test classes.


把junit.jar添加到CLASSPATH之后,再执行“source /etc/profile”还是不行。关于这个问题,我在以下网页找到了答案:http://web.archiveorange.com/archive/v/bnxdGqvdgVMSsMDezfFT


提问者所遇到的问题和我的类似:

Parchet Michaël <parc...@hotmail.com> Mon Apr 16 2007 02:37:22 GMT+0800 (CST)

Hello,I'm looking for some help to install and use apache-ant on mandriva linux.==20I tried to compile source distribution but I receved the following errormessage:builb.xml:911  We cannot build the test jar unless JUnit is present,as JUnit is needed to compile the test classes.Total time: 12 seconds... Failed Building Ant Distribution !Bootstrap FAILEDI createad a CLASSPATH variable but this failedThanks for any help and suggestionsBattantPS i work on manriva linux 2007


最佳答案:

Kevin Jackson <foam...@gmail.com> Mon Apr 16 2007 11:27:01 GMT+0800 (CST)

 Hello,Hi,Hide quoted text> I tried to compile source distribution but I receved the following error> message:When I compile from source I use bootstrap.sh followed by build.shHide quoted text>> builb.xml:911  We cannot build the test jar unless JUnit is present,>> as JUnit is needed to compile the test classes.>> Total time: 12 seconds>> ... Failed Building Ant Distribution !>> Bootstrap FAILED>> I createad a CLASSPATH variable but this failed>Any CLASSPATH variable that you set will be ignored by the bootstrap &build scripts as they manage the build classpathCheck in the source code under lib/optional, there should be a junitjar there.  If there isn't, copy a junit jar (v3.8.2) intolib/optional and try running bootstrap.sh again