Hello,
When using Eclipse 3.0, ant 1.6.1 and cactus 1.6.1 I get the following error when trying to use the cactifywar task:
D:\chuisman\dev\egon\build-cactus.xml:21: taskdef A class needed by class org.apache.cactus.integration.ant.CactifyWarTask cannot be found: org/apache/commons/logging/Log
I also get the following warning in eclipse: A class needed by class org.apache.Cactus.integration.ant.CactusTask cannot be found: junit/framework/TestListener
I have created an ant task in eclips (Window->preferences->ant->Runtime-Tasks) called cactus.ejb which points to the CactusTask class. If I remove this task I get the following error:
taskdef A class needed by class org.apache.cactus.integration.ant.CactusTask cannot be found: junit/framework/TestListener
Same one as the warning in eclipse.
If i run it from the command line with the verbose option set I get the following error:
[ant] Entering D:\chuisman\dev\egon\build-cactus.xml... Build sequence for target `ear.cactify' is [ear.cactify] Complete build sequence is [ear.cactify, test, ]
ear.cactify: [ant] Exiting D:\chuisman\dev\egon\build-cactus.xml. [antcall] Exiting D:\chuisman\dev\egon\build.xml. [antcall] Exiting D:\chuisman\dev\egon\build.xml.
BUILD FAILED
D:\chuisman\dev\egon\build.xml:74: Following error occured while executing this
line
D:\chuisman\dev\egon\build.xml:474: Following error occured while executing this
line
D:\chuisman\dev\egon\build.xml:481: Following error occured while executing this
line
D:\chuisman\dev\egon\build-cactus.xml:32: Could not create task or type of type:
cactifywar.
Ant could not find the task or a class this task relies upon.
This is common and has a number of causes; the usual solutions are to read the manual pages then download and install needed JAR files, or fix the build file: - You have misspelt 'cactifywar'. Fix: check your spelling. - The task needs an external JAR file to execute and this is not found at the right place in the classpath. Fix: check the documentation for dependencies. Fix: declare the task. - The task is an Ant optional task and optional.jar is absent Fix: look for optional.jar in ANT_HOME/lib, download if needed - The task was not built into optional.jar as dependent libraries were not found at build time. Fix: look in the JAR to verify, then rebuild with the needed libraries, or download a release version from apache.org - The build file was written for a later version of Ant Fix: upgrade to at least the latest release version of Ant - The task is not an Ant core or optional task and needs to be declared using <taskdef>.
Remember that for JAR files to be visible to Ant tasks implemented in ANT_HOME/lib, the files must be in the same directory or on the classpath
Please neither file bug reports on this problem, nor email the Ant mailing lists, until all of these causes have been explored, as this is not an Ant bug. at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec tHelper.java:574) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:422) at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:144)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:306) at org.apache.tools.ant.Task.perform(Task.java:401) at org.apache.tools.ant.Target.execute(Target.java:338) at org.apache.tools.ant.Target.performTasks(Target.java:365) at org.apache.tools.ant.Project.executeTarget(Project.java:1237) at org.apache.tools.ant.Project.executeTargets(Project.java:1094) at org.apache.tools.ant.Main.runBuild(Main.java:669) at org.apache.tools.ant.Main.startAnt(Main.java:220) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:215) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:90)
The ant code is:
<target name="ear.cactify" >
<taskdef resource="cactus.tasks">
<classpath>
<pathelement location="${cactus.ant.jar}"/>
<pathelement location="${cactus.jar}"/>
<pathelement location="${logging.jar}"/>
<pathelement location="${aspectjrt.jar}"/>
<pathelement location="${httpclient.jar}"/>
</classpath>
</taskdef><cactifywar version="2.3" destfile="${dist.dir}/${war.test.name}"
mergewebxml="${conf.dir}/cactus/web.xml">
<classes dir="${build.class.dir}" includes="**/cactus/**/*.class" />
</cactifywar><ear update="true" destfile="${dist.dir}/${ear.name}"
appxml="${conf.dir}/cactus/application.xml">
<fileset dir="${dist.dir}">
<include name="${war.test.name}"/>
</fileset>
</ear></target>
Can anyone tell me what I am doing wrong?
Does it have something to do with: http://www.mail-archive.com/[EMAIL PROTECTED]/msg05506.html
and if so can you explain how to set up ant task more completely?
Thank you,
Chris.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
