2 Replies Latest reply on Jul 31, 2008 11:48 AM by gerry N/A

    Error running JSFUnit with ant

    gerry N/A Newbie

      I am getting an error whilst trying to use jsfunitwar target

      I have put these jars in the ant/lib directory as well.... but they are still not found by the script (ant version apache-ant-1.7.0)

      Any help greatly appreciated guys

      thanks

      slabside

      The error is:
      jsfunit.war:
      [jsfunitwar] Automatically adding JSFunit required jars to the new war
      [jsfunitwar] Could not find the JSFUnit jar in the classpath. Cannot automatically add this jar to the war
      [jsfunitwar] Could not find the AspectJ jar in the classpath. Cannot automatically add this jar to the war
      [jsfunitwar] Could not find the Cactus jar in the classpath. Cannot automatically add this jar to the war
      [jsfunitwar] Could not find the HttpUnit jar in the classpath. Cannot automatically add this jar to the war
      [jsfunitwar] Could not find the JUnit jar in the classpath. Cannot automatically add this jar to the war
      [jsfunitwar] Could not find the NekoHTML jar in the classpath. Cannot automatically add this jar to the war
      [jsfunitwar] Could not find the JTidy jar in the classpath. Cannot automatically add this jar to the war

      the script looks like:



      <project name="JSFUnit" default="jsfunit.war" basedir=".">
      
      <property name="work.files" value="${basedir}/workingfiles" />
      <property name="target.dir" value="${work.files}/CST/Applications/Desktop-Applications/cst-bankdetails-war/target"/>
      <property name="src.dir" value="${target.dir}" />
      <property name="lib.dir" value="${basedir}/jsfunit-jars" />
      <property name="cst.war" value="${target.dir}/cst-bankdetails-war" />
      <property name="jsf.cst.war" value="${work.files}/jsfunit-war" />
      <property name="jsf.test.classes" value="${src.dir}/classes/uk/co/slc/cst/jsfunit" />
      
      <property name="aspectjrt.jar" location="${lib.dir}/aspectjrt-1.2.1.jar"/>
      <property name="cactus.jar" location="${lib.dir}/cactus-13-1.7.1.jar"/>
      <property name="httpunit.jar" location="${lib.dir}/httpunit-1.6.1.jar"/>
      <property name="junit.jar" location="${lib.dir}/junit-3.8.1.jar"/>
      <property name="jtidy.jar" location="${lib.dir}/jtidy-4aug2000r7-dev.jar"/>
      <property name="cargo.jar" location="${lib.dir}/cargo-0.6.jar"/>
      <property name="jboss-jsfunit-core.jar" location="${lib.dir}/jboss-jsfunit-core-1.0.0.Beta2.jar"/>
      <property name="nekohtml.jar" location="${lib.dir}/nekohtml-0.9.1.jar"/>
      
      <target name="jsfunit.war">
      
       <path id="jsfunit.classpath">
       <pathelement location="${aspectjrt.jar}"/>
       <pathelement location="${cactus.jar}"/>
       <pathelement location="${httpunit.jar}"/>
       <pathelement location="${junit.jar}"/>
       <pathelement location="${jtidy.jar}"/>
       <pathelement location="${cargo.jar}"/>
       <pathelement location="${jboss-jsfunit-core.jar}"/>
       <pathelement location="${nekohtml.jar}"/>
       </path>
      
       <taskdef
       name="jsfunitwar"
       classname="org.jboss.jsfunit.ant.JSFUnitWarTask"
       classpathref="jsfunit.classpath"/>
      
       <jsfunitwar srcfile="${cst.war}" destfile="${jsf.cst.war}">
       <classes dir="${jsf.test.classes}"
       includes="**/*.class">
       </classes>
      
       <TestRunner/>
       </jsfunitwar>
      </target>
      </project>