ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "HENRY Nicolas" <>
Subject Task style from ANT
Date Fri, 12 Jan 2001 10:17:55 GMT
Hi all,
we're using a ANT makefile in order to build, generate doc
& integrate our JUnit tests.
So after compil & javadoc generation we invoke Junit using Junit task, then we use the
task style in order to get pretty HTML reports...But this last step fails!!!!
It seems that the XSL Liaison class required is not found...
This is the stack trace :


    [junit] Running DummyTestSuite
    [junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 0,11 sec
    [junit] TEST DummyTestSuite FAILED
    [junit] Running DummyClassTest
    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,02 sec
    [junit] TEST DummyClassTest FAILED
    [junit] Running DummyTestSuite
    [junit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 0,02 sec
    [junit] TEST DummyTestSuite FAILED

trying xalan


E:\DEV\tests\build.xml:75: java.lang.ClassNotFoundException:

This is our build.xml file :

<project name="TEST" default="compile" basedir=".">
<property name="" value="sample" />
<property name="build.dir" value="build/classes" />
<property name="report.dir" value="doc/report" />
<taskdef name="junit" classname=""
<taskdef name="style" classname="" />

<target name="JUNIT">
 <available property="junit.present" classname="junit.framework.TestCase" />

<target name="compile" depends="JUNIT">
 <mkdir dir="${build.dir}"/>
 <javac srcdir="./" destdir="${build.dir}"  >
  <include name="**/*.java"/>

<target name="jar" depends="compile">
 <mkdir dir="build/lib"/>
 <jar jarfile="build/lib/${}.jar"
  basedir="${build.dir}" includes="**" />

<target name="compiletests" depends="jar">
 <mkdir dir="build/testcases" />
 <javac srcdir="." destdir="build/testcases">
   <pathelement location="build/lib/${}.jar" />
   <pathelement path="" />
  <include name="**/*.java" />

<target name="runtests" depends="compiletests" if="junit.present">
 <java fork="yes" classname="junit.textui.TestRunner"
  taskname="junit" failonerror="true">
  <arg value="DummyTestSuite" />
   <pathelement location="build/lib/${}.jar" />
   <pathelement location="build/testcases" />
   <pathelement path="" />
   <pathelement path="${java.class.path}" />

<target name="buildreport" depends="compiletests" if="junit.present">
 <mkdir dir="${report.dir}"/>
 <junit printsummary="yes" haltonfailure="no">
      <pathelement location="${build.dir}" />
      <pathelement path="${java.class.path}" />

  <formatter type="plain" />

    <test name="DummyTestSuite" haltonfailure="no" outfile="${report.dir}/result" >
     <formatter type="xml" />

    <batchtest fork="yes">
      <fileset dir="./">
         <include name="**/*Test*.java" />
         <exclude name="**/" />

<target name="makehtml" depends="buildreport" if="junit.present">
 <style basedir="${report.dir}" destdir="${report.dir}"
  extension="html" style="style/apache.xml"/>


We use ANT 1.2,  Xalan 2 & Junit 3.4....

Any clues welcomed....

Sorry for this a little bit large post....


View raw message