cactus

For anyone who is interested, the solution I found to this problem is to add
the junit.jar and tools.jar(from the java jdk) to Global Entries on the
classpath tab in Eclipse's Window->Preferences->Ant->Runtime, rather than to
Ant Home Entries.  The Eclipse ant editor will still give you a warning that
the class can't be found, but it runs just fine.  That's the solution I
found, anyhow.  If anyone knows a better way, please fill me in.

Chau for now...

-----Original Message-----
From: Jan.Materne@(protected) [mailto:Jan.Materne@(protected)]
Sent: Friday, June 03, 2005 12:07 AM
To: user@(protected)
Subject: AW: taskdef can't find junit.framework.Test

To really ensure that JUnit is on Ant's classpath, you could print it out
   <echo>classpath: ${java.class.path}</echo>

But putting junit.jar into ${user.home}/.ant/lib should help.
Or starting Ant with
 -lib <directory of junit.jar>


Jan

> -----Urspr?ngliche Nachricht-----
> Von: Hyrum [mailto:hyrum@(protected)]
> Gesendet am: Freitag, 3. Juni 2005 01:16
> An: user@(protected)
> Betreff: taskdef can't find junit.framework.Test
>
> Hello all.
>
>
>
> I am using the Eclipse 3.1 IDE, am on windows 2000, and am using
> ant-1.6.2(built into eclipse).
>
>
>
> My build fails with the following error:
>
>
>
> BUILD FAILED:
> C:/eclipse/workspace/CactusTestTest/build.xml:34: taskdef A
> class needed by class
> org.apache.cactus.integration.ant.CactusTask cannot be
> found: junit/framework/Test
>
>
>
> I have checked and double checked, and that class is definitely on the
> classpath.  As far as I can see, it should be available.  I have tried
> adding it to Eclipse's Ant->Runtime->Classpath settings, and
> to Ant's home
> lib directory, with no success.  I've also tried adding
> manual entries for
> each tasks, to which it always fails on the "cactus" taskdef,
> with the same
> above error.
>
>
>
> Any ideas?
>
>
>
> ------------------------------------------------
>
>
>
> <?xml version="1.0"?>
>
> <project name="CactusTestTest" default="make-war-with-cacti"
> basedir=".">
>
>
>
>             <property file="${basedir}/build.properties"/>
>
>
>
>             <property name="application.name"   value="
> CactusTestTest "/>
>
>             <property name="servlet.jar"
> value="${tomcat.home}/common/lib/servlet-api.jar"/>
>
>     <property name="jsp.jar"
> value="${tomcat.home}/common/lib/jsp-api.jar"/>
>
>     <property name="deploy.dir"
> value="${tomcat.home}/webapps"/>
>
>     <property name="build.compiler"     value="modern"/>
>
>     <property name="build.dir"
> value="${basedir}/WEB-INF/classes"
> />
>
>             <property name="jspbuild.dir"
> value="./jspclasses" />
>
>             <property name="webinf.dir"
> value="WebRoot/WEB-INF" />
>
>             <property name="classes.dir"
> value="${webinf.dir}/classes" />
>
>             <property name="lib.dir"
> value="${webinf.dir}/lib" />
>
>             <property name="src.dir"
> value="${basedir}/src" />
>
>
>
>             <path id="cactus.classpath" >
>
>         <fileset dir="${lib.dir}">
>
>           <include name="*.jar"/>
>
>         </fileset>
>
>             </path>
>
>
>
>             <target name="init" >
>
>                         <echo message="Starting the Test to Test the
> CactusTestTest" />
>
>
>
>                         <!--
>
>                         <taskdef name="cactifywar"
> classname="org.apache.cactus.integration.ant.CactifyWarTask"
>
>                                     classpathref="cactus.classpath" />
>
>                         <taskdef name="cactus"
> classname="org.apache.cactus.integration.ant.CactusTask"
>
>                                     classpathref="cactus.classpath" />
>
>                         -->
>
>
>
>                         <taskdef resource="cactus.tasks"
> classpathref="cactus.classpath" />
>
>             </target>
>
>
>
>             <target name="make-war-with-cacti" depends="init" >
>
>                         <cactifywar />
>
>             </target>
>
>
>
>
>
> </project>
>
>


 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值