ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: junit crashes on first test of suite
Date Mon, 02 Feb 2004 17:01:16 GMT
It really looks like those 5 lines should be replaced with one:

	<pathelement location="src\classes"/>

Hope this helps
Keith


-----Original Message-----
From: Lauzon Daniel-Y18165 [mailto:Y18165@motorola.com]
Sent: 02 February 2004 16:55
To: 'Ant Users List'
Subject: RE: junit crashes on first test of suite


I gave shot to:
	<classpath>
		<pathelement location="src\classes\com\motorola\ptt\tests\unit"/>
		<pathelement location="src\classes\com\motorola\ptt\exception"/>
		<pathelement location="src\classes\com\motorola\ptt\snmp"/>
		<pathelement location="src\classes\com\motorola\ptt"/>
		<pathelement location="src\classes\com\motorola\ptt\tests"/>
		<pathelement location="lib"/>
		<pathelement location="etc"/>
  	</classpath>

and got the same:

	    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
	
	    [junit]     Caused an ERROR
	    [junit] com.motorola.ptt.tests.PostPTTRequest
	    [junit] java.lang.ClassNotFoundException: com.motorola.ptt.tests.PostPTTRequ
	est
	    [junit]     at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	    [junit]     at java.security.AccessController.doPrivileged(Native Method)
	    [junit]     at java.net.URLClassLoader.findClass(URLClassLoader.java:183) 

I double checked that the classes were actually there (including "PostPTTRequest" in "tests").

Must be some glitch I just cannot see.

Note: If I add the PostPTTRequest.class to the path, the error (in -d mode) that I get mentions
an incapacity to unzip it:
My understanding would be that given a path in the classpath, all jars in it will be expanded;
given a file, it is assumed to be a jar and an attempt is made to expand it. Am I making any
sense?

-----Original Message-----
From: Dominique Devienne [mailto:DDevienne@lgc.com]
Sent: 2 fevrier, 2004 11:13
To: 'Ant Users List'
Subject: RE: junit crashes on first test of suite


> From: Lauzon Daniel-Y18165 [mailto:Y18165@motorola.com]
><junit printsummary="true">
>  <classpath>
>    <pathelement location="src\com\motorola\ptt\tests\unit"/>
>    ...
>    <pathelement location="lib"/>
>    <pathelement location="etc"/>
>  </classpath>
> <junit>

Your classpath looks incorrect. You probably shouldn't have
anything below src/ in it. One usually compiles classes from
src/ into build/classes/, and just use build/classes in the
<junit> classpath (with dependent JARs of course). --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message