Hi all,
I'm trying to use ANT to build my project which uses Cactus for war generation and test cases. I think I've got all the jar files in the right places, but I'm getting this error when executing the ANT script:
BUILD FAILED
file:D:/Chuck/STIC/Projects/Platform/build.xml:167: taskdef class org.apache.cac
tus.integration.ant.CactusTask cannot be found
file:D:/Chuck/STIC/Projects/Platform/build.xml:167: taskdef class org.apache.cac
tus.integration.ant.CactusTask cannot be found
Any thoughts as to what I need to do to correct this? My cactus jar files appear to be in the right place (my lib folder for my project).
I've attached the ANT build file if that helps.
This one's really frustrating me!
Thanks in advance
Chuck Williams
Why Wait? Move to EarthLink.
<project name="Platform" default="deploytest" basedir=".">
<!-- ========== -->
<!-- PROPERTIES -->
<!-- ========== -->
<property environment="env" />
<property name="platform.home" value="D:\Chuck\STIC\Projects\Platform" />
<property name="jboss.home" value="${env.JBOSS_HOME}" />
<property name="jboss.configuration" value="jbpm" />
<property name="jboss.server" value="${jboss.home}/server/${jboss.configuration}" />
<property name="jboss.deploy" value="${jboss.server}/deploy" />
<property name="ant.home" value="${env.ANT_HOME}" />
<property name="db.driver" value="org.hsqldb.jdbcDriver" />
<property name="db.classpath" value="${jboss.server}/lib/hsqldb.jar" />
<property name="db.url" value="jdbc:hsqldb:hsql://localhost:1701" />
<property name="db.userid" value="sa" />
<property name="db.password" value="" />
<!-- properties specific for the examples -->
<property name="jbpm.home" value="${env.JBPM_HOME}" />
<property name="dir.dbscripts" value="${jbpm.home}/config/db" />
<property file="build.properties"/>
<!-- properties specific for the examples -->
<path id="classpath">
<pathelement path="${dir.classes}" />
<fileset dir="${dir.lib}" includes="*.jar" />
<fileset dir="${jboss.home}/client" includes="**/*.jar" />
<fileset dir="${jboss.server}/lib" includes="**/*.jar" />
</path>
<!-- ============= -->
<!-- CLEAN TARGETS -->
<!-- ============= -->
<target name="clean" description="removes the classes and build folders that contain the generated files">
<delete dir="${dir.classes}" />
<delete dir="${dir.build}" />
<delete dir="${dir.report}" />
</target>
<target name="cleanjboss" description="cleans the jbpm configuration of your jboss">
<delete dir="${jboss.server}/tmp" />
<delete dir="${jboss.server}/db" />
<delete dir="${jboss.server}/data" />
<delete dir="${jboss.server}/log" />
</target>
<!-- ============== -->
<!-- COMPILE TARGET -->
<!-- ============== -->
<target name="prepare" description="creates folders classes and build">
<mkdir dir="${dir.classes}" />
<mkdir dir="${dir.build}" />
</target>
<target name="compile" depends="prepare" description="compiles the delegation classes">
<javac srcdir="src" destdir="${dir.classes}" debug="on" fork="yes">
<classpath refid="classpath"/>
</javac>
</target>
<!-- =============== -->
<!-- BUILDER TARGETS -->
<!-- =============== -->
<target name="buildarchives" depends="compile" description="builds the process archives">
<jar jarfile="${dir.build}/switch.par">
<fileset dir="process/switch" />
<fileset dir="${dir.classes}/..">
<include name="classes/org/jbpm/examples/delegate/MyDbAction.class" />
<include name="classes/org/jbpm/examples/delegate/TimeTriggeredAction.class" />
</fileset>
</jar>
</target>
<target name="buildtest" depends="compile,declarecactustasks" description="builds the web-application that contains the process tests">
<cactifywar destfile="${dir.build}/switchtest.war" version="2.3">
<lib dir="${dir.jbpmclient}" includes="jbpmclient.jar" />
<fileset dir="${dir.build}" includes="switch.par"/>
<classes dir="${dir.classes}" includes="**/*.class"/>
</cactifywar>
</target>
<!-- ============== -->
<!-- DEPLOY TARGETS -->
<!-- ============== -->
<target name="deploytest" depends="dbreset,buildtest" description="copy the test-web-application to the deploy folder in the jbpm configuration of jboss">
<copy file="${dir.build}/switchtest.war" todir="${jboss.deploy}" overwrite="true"/>
<ant target="deployarchives" />
</target>
<target name="deployswitch" depends="buildarchives" description="upload the switch.par process archive into the jBpm application">
<java classname="org.jbpm.util.ant.DeployProcess" failonerror="true" fork="yes">
<classpath refid="classpath" />
<arg value="${dir.build}/switch.par"/>
</java>
</target>
<target name="deployarchives" depends="deployswitch" description="upload the pregnancy.par process archive into the jBpm application" />
<target name="undeploy" description="delete the test-web-application from the deploy folder in the jbpm configuration of jboss">
<delete file="${jboss.deploy}/switchtest.war" />
</target>
<!-- ================ -->
<!-- DATABASE TARGETS -->
<!-- ================ -->
<!-- drops and creates the jbpm tables -->
<target name="dbcreate" description="drops and recreates the jbpm database (don't mind the couldn't-drop-warnings in case the jbpm-tables didn't exist)">
<sql driver="${db.driver}" classpath="${db.classpath}" url="${db.url}" userid="${db.userid}" password="${db.password}"
src="${dir.dbscripts}/create.sql" onerror="continue" />
</target>
<!-- inserts the sample organisational test data into the jbpm organisation tables -->
<target name="dborganisation" description="inserts the organisational test data in the organisation tables. These tables are also used by the j2ee security that is configured in jboss">
<sql driver="${db.driver}" classpath="${db.classpath}" url="${db.url}" userid="${db.userid}" password="${db.password}"
src="${dir.dbscripts}/organisation.sql" />
</target>
<!-- recreates the db and inserts the sample organisational test data -->
<target name="dbreset" depends="dbcreate,dborganisation" description="drops, recreates and initializes the jbpm database"/>
<!-- ============ -->
<!-- TEST TARGETS -->
<!-- ============ -->
<target name="testarchives" depends="deploytest,declarecactustasks" description="execute the tests in the test-web-application and save the reports">
<mkdir dir="${dir.report}"/>
<sleep seconds="7" />
<cactus warfile="${dir.build}/examplestest.war" printsummary="yes" >
<classpath refid="classpath" />
<containerset>
<jboss3x dir="${jboss.home}" config="jbpm" todir="${dir.report}"/>
</containerset>
<formatter type="xml"/>
<batchtest>
<fileset dir="src">
<include name="org/jbpm/examples/test/*.java"/>
</fileset>
</batchtest>
</cactus>
</target>
<!-- ================= -->
<!-- TASK DECLARATIONS -->
<!-- ================= -->
<!--<target name="declarecactustasks" description="declares the cactus tasks">
<taskdef resource="cactus.tasks">
<classpath>
<pathelement path="${classpath}" />
<pathelement path="${env.CLASSPATH}" />
<fileset dir="${dir.lib}" includes="**/*.jar" />
<fileset dir="${jboss.home}/client" includes="**/*.jar" />
<fileset dir="${jboss.server}/lib" includes="**/*.jar" />
<fileset dir="${platform.home}/lib" includes="*.jar" />
</classpath>
<classpath refid="classpath"/>
</taskdef>
</target>-->
<target name="declarecactustasks" description="declare the cactus tasks">
<taskdef name="cactus" classname="org.apache.cactus.integration.ant.CactusTask">
<classpath refid="classpath"/>
</taskdef>
<taskdef name="cactifywar" classname="org.apache.cactus.integration.ant.CactifyWarTask">
<classpath refid="classpath"/>
</taskdef>
<taskdef name="runservertests" classname="org.apache.cactus.integration.ant.RunServerTestsTask">
<classpath refid="classpath"/>
</taskdef>
<taskdef name="webxmlmerge" classname="org.apache.cactus.integration.ant.WebXmlMergeTask">
<classpath refid="classpath"/>
</taskdef>
</target>
</project>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
