You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Peter Nilsson <pe...@roqport.com> on 2001/08/13 18:42:04 UTC

junit problems

Hi,
I can't get junit tasks to work.

My build.xml looks like this (part of it):

	<target name="test" >
		<junit fork="yes" printsummary="yes">
			<test name="simsn.monitor.TestLogDetails"
				todir="${junit.results}"
			/>
		</junit>
	</target>

Following happens when I run Ant:

J:\test\ant>ant test
Buildfile: build.xml

test:

BUILD FAILED

J:\test\ant\build.xml:153: Could not create task of type: junit. Common
solutions are to use taskdef to declare your task, or, if this is an
optional task, to put the optional.jar in the lib directory of your ant
installation (ANT_HOME).

Total time: 1 second
J:\test\ant>

I have put junit.jar into the lib directory and also have added junit.jar to
the classpath...but it still doesn't work.

Any ideas are appreciated!

Thanks,
Peter






Re: junit problems

Posted by Erik Hatcher <er...@earthlink.net>.
How about optional.jar??


----- Original Message -----
From: "Peter Nilsson" <pe...@roqport.com>
To: "ant" <an...@jakarta.apache.org>
Sent: Monday, August 13, 2001 9:42 AM
Subject: junit problems


> Hi,
> I can't get junit tasks to work.
>
> My build.xml looks like this (part of it):
>
> <target name="test" >
> <junit fork="yes" printsummary="yes">
> <test name="simsn.monitor.TestLogDetails"
> todir="${junit.results}"
> />
> </junit>
> </target>
>
> Following happens when I run Ant:
>
> J:\test\ant>ant test
> Buildfile: build.xml
>
> test:
>
> BUILD FAILED
>
> J:\test\ant\build.xml:153: Could not create task of type: junit. Common
> solutions are to use taskdef to declare your task, or, if this is an
> optional task, to put the optional.jar in the lib directory of your ant
> installation (ANT_HOME).
>
> Total time: 1 second
> J:\test\ant>
>
> I have put junit.jar into the lib directory and also have added junit.jar
to
> the classpath...but it still doesn't work.
>
> Any ideas are appreciated!
>
> Thanks,
> Peter
>
>
>
>
>


Re: junit problems

Posted by Dong Chen <Do...@kingston.hummingbird.com>.
Aslo need to set project.path to junit.jar.
Dong
----- Original Message -----
From: Peter Nilsson <pe...@roqport.com>
To: <an...@jakarta.apache.org>
Sent: Monday, August 13, 2001 1:26 PM
Subject: SV: junit problems


> According to "Ant Installation Guide" (Ant 1.3) I should add "junit.jar"
to
> my ANT_HOME/lib directory, to make the junit task to work. I have done
that,
> but it doesn't seem to help.
> Any more hints out there?
>
> Thanks,
> Peter
>
>
> -----Ursprungligt meddelande-----
> Från: T Master [mailto:tmaster@iknowledgeinc.com]
> Skickat: den 13 augusti 2001 18:49
> Till: ant-user@jakarta.apache.org
> Ämne: Re: junit problems
>
>
> Download  "optional.jar". then put it in your ANT_HOME/lib   directory.
> I had the same problem.
> You can find the link from the user manual (not at hand sorry).  Same page
> as downloads i think.
>
> T Master.
>
> ----- Original Message -----
> From: "Peter Nilsson" <pe...@roqport.com>
> To: "ant" <an...@jakarta.apache.org>
> Sent: Monday, August 13, 2001 10:42 AM
> Subject: junit problems
>
>
> > Hi,
> > I can't get junit tasks to work.
> >
> > My build.xml looks like this (part of it):
> >
> > <target name="test" >
> > <junit fork="yes" printsummary="yes">
> > <test name="simsn.monitor.TestLogDetails"
> > todir="${junit.results}"
> > />
> > </junit>
> > </target>
> >
> > Following happens when I run Ant:
> >
> > J:\test\ant>ant test
> > Buildfile: build.xml
> >
> > test:
> >
> > BUILD FAILED
> >
> > J:\test\ant\build.xml:153: Could not create task of type: junit. Common
> > solutions are to use taskdef to declare your task, or, if this is an
> > optional task, to put the optional.jar in the lib directory of your ant
> > installation (ANT_HOME).
> >
> > Total time: 1 second
> > J:\test\ant>
> >
> > I have put junit.jar into the lib directory and also have added
junit.jar
> to
> > the classpath...but it still doesn't work.
> >
> > Any ideas are appreciated!
> >
> > Thanks,
> > Peter
>
>
>


SV: junit problems

Posted by Peter Nilsson <pe...@roqport.com>.
According to "Ant Installation Guide" (Ant 1.3) I should add "junit.jar" to
my ANT_HOME/lib directory, to make the junit task to work. I have done that,
but it doesn't seem to help.
Any more hints out there?

Thanks,
Peter


-----Ursprungligt meddelande-----
Från: T Master [mailto:tmaster@iknowledgeinc.com]
Skickat: den 13 augusti 2001 18:49
Till: ant-user@jakarta.apache.org
Ämne: Re: junit problems


Download  "optional.jar". then put it in your ANT_HOME/lib   directory.
I had the same problem.
You can find the link from the user manual (not at hand sorry).  Same page
as downloads i think.

T Master.

----- Original Message -----
From: "Peter Nilsson" <pe...@roqport.com>
To: "ant" <an...@jakarta.apache.org>
Sent: Monday, August 13, 2001 10:42 AM
Subject: junit problems


> Hi,
> I can't get junit tasks to work.
>
> My build.xml looks like this (part of it):
>
> <target name="test" >
> <junit fork="yes" printsummary="yes">
> <test name="simsn.monitor.TestLogDetails"
> todir="${junit.results}"
> />
> </junit>
> </target>
>
> Following happens when I run Ant:
>
> J:\test\ant>ant test
> Buildfile: build.xml
>
> test:
>
> BUILD FAILED
>
> J:\test\ant\build.xml:153: Could not create task of type: junit. Common
> solutions are to use taskdef to declare your task, or, if this is an
> optional task, to put the optional.jar in the lib directory of your ant
> installation (ANT_HOME).
>
> Total time: 1 second
> J:\test\ant>
>
> I have put junit.jar into the lib directory and also have added junit.jar
to
> the classpath...but it still doesn't work.
>
> Any ideas are appreciated!
>
> Thanks,
> Peter




Re: junit problems

Posted by T Master <tm...@iknowledgeinc.com>.
Download  "optional.jar". then put it in your ANT_HOME/lib   directory.
I had the same problem.
You can find the link from the user manual (not at hand sorry).  Same page
as downloads i think.

T Master.

----- Original Message -----
From: "Peter Nilsson" <pe...@roqport.com>
To: "ant" <an...@jakarta.apache.org>
Sent: Monday, August 13, 2001 10:42 AM
Subject: junit problems


> Hi,
> I can't get junit tasks to work.
>
> My build.xml looks like this (part of it):
>
> <target name="test" >
> <junit fork="yes" printsummary="yes">
> <test name="simsn.monitor.TestLogDetails"
> todir="${junit.results}"
> />
> </junit>
> </target>
>
> Following happens when I run Ant:
>
> J:\test\ant>ant test
> Buildfile: build.xml
>
> test:
>
> BUILD FAILED
>
> J:\test\ant\build.xml:153: Could not create task of type: junit. Common
> solutions are to use taskdef to declare your task, or, if this is an
> optional task, to put the optional.jar in the lib directory of your ant
> installation (ANT_HOME).
>
> Total time: 1 second
> J:\test\ant>
>
> I have put junit.jar into the lib directory and also have added junit.jar
to
> the classpath...but it still doesn't work.
>
> Any ideas are appreciated!
>
> Thanks,
> Peter