commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang] NumberRange contribution
Date Thu, 28 Feb 2002 03:04:44 GMT
Commited.

I'm with you on the JUnit error Christopher. I've had it working on
another machine, but can't seem to get the current one beyond the
TextRunner error atm. [I did have an old junit in there for a while, but
that's now fixed].

On Mon, 25 Feb 2002, Christopher Elkins wrote:

> On Mon, Feb 25, 2002 at 08:59:40AM -0800, Daniel Rall wrote: >
> Christopher Elkins <chrise@scardini.com> writes: > > > (P.S. Why are
> seemingly all of the commons modules allergic to using Ant's > >
> <junit> task? I couldn't get the current test target to work at all,
> so I > > was forced to hack in a temporary target in order to execute
> my NumberRangeTest > > class succesfully.) > > Hey Chris.  Did you try
> putting junit.jar in your $ANT_HOME/lib/ > directory?  I've had
> similar problems in the past, and Jason van Zyl > pointed me to this
> as a solution (he also mentioned that it's > documented by the <junit>
> task).
>
> I think I tried that in the past, and it didn't work. At any rate, I tried it
> again, and it still doesn't work. :-(
>
>
> For the curious reading along, executing 'ant test' results in:
>
> test.strings:
>      [echo] Running Strings tests ...
>      [java] Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner
>
> BUILD FAILED
>
> (Relevant Ant debug output attached below.)
>
>
> Maybe it's just me, but the only reliable solution I've ever found is adding
> junit.jar to my CLASSPATH and using the <junit> task. (I do realize this
> fails miserably unless you have optional.jar in $ANT_HOME/lib.)
>
> --
> Christopher Elkins
>
>
>
> 'ant -debug test' output:
> ...
>
> test.strings:
>      [echo] Running Strings tests ...
>      [java] Forking /usr/j2se/jre/../bin/java -classpath /home/chrise/src/jakarta/jakarta-commons-sandbox/lang/target/classes:/home/chrise/src/jakarta/jakarta-commons-sandbox/lang/target/tests
junit.textui.TestRunner org.apache.commons.lang.StringsTest
> Execute:Java13CommandLauncher: /usr/j2se/jre/../bin/java -classpath /home/chrise/src/jakarta/jakarta-commons-sandbox/lang/target/classes:/home/chrise/src/jakarta/jakarta-commons-sandbox/lang/target/tests
junit.textui.TestRunner org.apache.commons.lang.StringsTest
>      [java] Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner
>
> BUILD FAILED
>
> /home/chrise/src/jakarta/jakarta-commons-sandbox/lang/build.xml:235: Java returned: 1
>         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:90)
>         at org.apache.tools.ant.Task.perform(Task.java:217)
>         at org.apache.tools.ant.Target.execute(Target.java:184)
>         at org.apache.tools.ant.Target.performTasks(Target.java:202)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:601)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:560)
>         at org.apache.tools.ant.Main.runBuild(Main.java:454)
>         at org.apache.tools.ant.Main.start(Main.java:153)
>         at org.apache.tools.ant.Main.main(Main.java:176)
>
> Total time: 3 seconds
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message