Removing
<formatter type="xml" />
allows the test to run, but then the report fails with:
javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
On 03/04/2008, Matt Benson <[EMAIL PROTECTED]> wrote:
> Just committed some stuff based on earlier Ant FAQs.
> Gotta go for now though--good luck!
>
>
> -Matt
>
>
> --- Matt Benson <[EMAIL PROTECTED]> wrote:
>
> >
> > --- sebb <[EMAIL PROTECTED]> wrote:
> >
> > > I think you've found the junit problem I
> > mentioned:
> > >
> > > run-tests:
> > > [junit] Using loader null on class
> > >
> >
> org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter:
> > > java.lang.NoClassDefFoundError: org/w3c/dom/Node
> > >
> > > This was using Java 1.3.1 and Ant 1.7.0 (junit
> > > 3.8.2);
> > > The same happens with Ant 1.6.5 (junit 3.8.1)
> >
> > I'll have a look. Thanks Seb!
> >
> > -Matt
> >
> > >
> > >
> > > On 02/04/2008, [EMAIL PROTECTED]
> > > <[EMAIL PROTECTED]> wrote:
> > > > Author: mbenson
> > > > Date: Wed Apr 2 15:38:31 2008
> > > > New Revision: 644093
> > > >
> > > > URL:
> > > http://svn.apache.org/viewvc?rev=644093&view=rev
> > > > Log:
> > > > update build.xml a little
> > > >
> > > > Modified:
> > > > commons/sandbox/functor/trunk/build.xml
> > > >
> > > > Modified:
> > commons/sandbox/functor/trunk/build.xml
> > > > URL:
> > >
> >
>
> http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/build.xml?rev=644093&r1=644092&r2=644093&view=diff
> > > >
> > >
> >
>
> ==============================================================================
> > > > --- commons/sandbox/functor/trunk/build.xml
> > > (original)
> > > > +++ commons/sandbox/functor/trunk/build.xml Wed
> > > Apr 2 15:38:31 2008
> > > > @@ -25,24 +25,9 @@
> > > >
> > > > <property file="build.properties"/>
> >
> > > <!-- Component local -->
> > > > <property file="../build.properties"/>
> >
> > > <!-- Commons (sandbox) local -->
> > > > - <property
> > > file="../../jakarta-commons/build.properties"/>
> > <!--
> > > Commons local -->
> > > > <property
> > > file="${user.home}/build.properties"/>
> > <!--
> > > User local -->
> > > >
> > > >
> > > > -<!-- ========== External Dependencies
> > > ===================================== -->
> > > > -
> > > > -
> > > > - <!-- The directories corresponding to your
> > > necessary dependencies -->
> > > > - <property name="junit.home"
> > > value="/usr/local/junit3.7"/>
> > > > -
> > > > -
> > > > -<!-- ========== Derived Values
> > > ============================================ -->
> > > > -
> > > > -
> > > > - <!-- The locations of necessary jar files
> > -->
> > > > - <property name="junit.jar"
> > > value="${junit.home}/junit.jar"/>
> > > > -
> > > > -
> > > > <!-- ========== Component Declarations
> > > ==================================== -->
> > > >
> > > >
> > > > @@ -56,22 +41,22 @@
> > > > <property name="component.title"
> > > value="Functor - Function Objects for Java"/>
> > > >
> > > > <!-- The current version number of this
> > > component -->
> > > > - <property name="component.version"
> > > value="1.0-dev"/>
> > > > + <property name="component.version"
> > > value="1.0-SNAPSHOT"/>
> > > >
> > > > <!-- The base directory for compilation
> > targets
> > > -->
> > > > - <property name="build.home"
> > > value="target"/>
> > > > + <property name="build.home"
> > > location="target"/>
> > > >
> > > > <!-- The base directory for component
> > > configuration files -->
> > > > - <property name="conf.home"
> > > value="src/conf"/>
> > > > + <property name="conf.home"
> > > location="src/conf"/>
> > > >
> > > > <!-- The base directory for distribution
> > > targets -->
> > > > - <property name="dist.home"
> > > value="dist"/>
> > > > + <property name="dist.home"
> > > location="dist"/>
> > > >
> > > > <!-- The base directory for component sources
> > > -->
> > > > - <property name="source.home"
> > > value="src/main/java"/>
> > > > + <property name="source.home"
> > > location="src/main/java"/>
> > > >
> > > > <!-- The base directory for unit test sources
> > > -->
> > > > - <property name="test.home"
> > > value="src/test/java"/>
> > > > + <property name="test.home"
> > > location="src/test/java"/>
> > > >
> > > >
> > > > <!-- ========== Compiler Defaults
> > > ========================================= -->
> > > > @@ -89,7 +74,6 @@
> > > > <!-- Construct compile classpath -->
> > > > <path id="compile.classpath">
> > > > <pathelement
> > > location="${build.home}/classes"/>
> > > > - <pathelement location="${junit.jar}"/>
> > > > </path>
> > > >
> > > > <path id="javadoc.classpath">
> > > > @@ -105,16 +89,12 @@
> > > > <pathelement
> > > location="${build.home}/classes"/>
> > > > <pathelement
> > > location="${build.home}/test-classes"/>
> > > > <pathelement location="${test.home}"/>
> > > > - <pathelement location="${junit.jar}"/>
> > > > </path>
> > > >
> > > > - <!-- Should all tests fail if one does? -->
> > > > - <property name="test.failonerror"
> > > value="true"/>
> > > > + <property name="test.entry"
> > > value="org.apache.commons.functor.TestAll"/>
> > > >
> > > > - <!-- The test runner to execute -->
> > > > - <property name="test.runner"
> > > value="junit.textui.TestRunner"/>
> > > > -
> > > > - <property name="test.entry"
> > > value="org.apache.commons.functor.TestAll"/>
> > > > + <property name="junit.fork"
> > > value="true" />
> > > > + <property name="junit.forkmode"
> > > value="once" />
> > > >
> > > > <!-- ========== Executable Targets
> > > ======================================== -->
> > > >
> > > > @@ -132,6 +112,7 @@
> > > > <mkdir dir="${build.home}/classes"/>
> > > > <mkdir dir="${build.home}/conf"/>
> > > > <mkdir dir="${build.home}/test-classes"/>
> > > > + <mkdir
> > > dir="${build.home}/junit-reports/xml"/>
> > > > </target>
> > > >
> > > >
> > > > @@ -153,7 +134,7 @@
> > > > </target>
> > > >
> > > >
> > > > - <target name="compile.tests"
> > depends="compile"
> > > > + <target name="compile-tests"
> > depends="compile"
> > > > description="Compile unit test cases">
> > > > <javac srcdir="${test.home}"
> > > > destdir="${build.home}/test-classes"
> > > > @@ -177,9 +158,7 @@
> > > > <mkdir dir="${dist.home}/docs/api"/>
> > > > <javadoc destdir="${dist.home}/docs/api"
> > > > sourcepath="${source.home}"
> > > > -
> > packagenames="org.apache.commons.*"
> > > > author="false"
> > > > - private="true"
> > > > version="true"
> > > >
> > > doctitle="<h1>${component.title} (Version
> > > ${component.version})</h1>"
> > > > windowtitle="${component.title}
> > > (Version ${component.version})"
> > > > @@ -203,12 +182,30 @@
> > > >
> > > > <!-- ========== Unit Test Targets
> > > ========================================= -->
> > > >
> > > > + <target name="run-tests"
> > > depends="compile-tests">
> > > > + <delete>
> > > > + <fileset
> > > dir="${build.home}/junit-reports/xml"/>
> > > > + </delete>
> > > > + <junit printsummary="withOutAndErr"
> > > showoutput="true"
> > > > + fork="${junit.fork}"
> > > forkmode="${junit.forkmode}"
> > > failureproperty="tests.failed">
> > > > + <formatter type="xml" />
> > > > + <formatter type="plain" />
> > > > + <test name="${test.entry}"
> > > todir="${build.home}/junit-reports/xml" />
> > > > + <classpath refid="test.classpath" />
> > > > + </junit>
> > > > + </target>
> > > > +
> > > >
> > > > - <target name="test" depends="compile.tests">
> > > > - <java classname="${test.runner}"
> > fork="yes"
> > > failonerror="${test.failonerror}">
> > > > - <arg value="${test.entry}"/>
> > > > - <classpath refid="test.classpath"/>
> > > > - </java>
> > > > + <target name="run-reports">
> > > > + <junitreport
> > > todir="${build.home}/junit-reports">
> > > > + <fileset
> > > dir="${build.home}/junit-reports/xml"
> > > includes="TEST-*.xml" />
> > > > + <report format="frames"
> > > todir="${build.home}/junit-reports" />
> > > > + </junitreport>
> > > > + </target>
> > > > +
> > > > +
> > > > + <target name="test" description="Run tests"
> > > depends="run-tests,run-reports">
> > > > + <fail if="tests.failed">Tests
> > > failed</fail>
> > > > </target>
> > > >
> > > > <!-- ========== Gump Targets
> > > ============================================== -->
> > > >
> > > >
> > > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >
> >
>
> ____________________________________________________________________________________
> > You rock. That's why Blockbuster's offering you one
> > month of Blockbuster Total Access, No Cost.
> > http://tc.deals.yahoo.com/tc/blockbuster/text5.com
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
> ____________________________________________________________________________________
> You rock. That's why Blockbuster's offering you one month of Blockbuster
> Total Access, No Cost.
> http://tc.deals.yahoo.com/tc/blockbuster/text5.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]