编译Ant时遇到的JUNIT错误

我的ubuntu是10.04,ant版本太低,又不想升级系统,只好自己下载编译新版ant. 本来以为很简单的事情,居然还会被卡住。

我在编译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/bash.bashrc”还是不行。关于这个问题,我在以下网页找到了答案:http://web.archiveorange.com/archive/v/bnxdGqvdgVMSsMDezfFT


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

Hello,

I'm looking for some help to install and use apache-ant on mandriva linux.=
=20

I tried to compile source distribution but I receved the following error
message:

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

Thanks for any help and suggestions

Battant

PS i work on manriva linux 2007


解决方法:

 

Any CLASSPATH variable that you set will be ignored by the bootstrap &

build scripts as they manage the build classpath

Check in the source code under lib/optional, there should be a junit

jar there.  If there isn't, copy a junit jar (v3.8.2) into

lib/optional and try running bootstrap.sh again

 

你可能感兴趣的:(编译Ant时遇到的JUNIT错误)