>
> The second possibility is configuration. I also had some problems
> locating files in Junit tests because of forking issues. If the above
> does not help, try creating a 'project.properties' file next to your
> 'project.xml' file and include this:
>
> # Forked JUnit because of some pro
Lennart Martens wrote:
Hi,
It probably boils down to either not having the necessary file
('foo.xml') in the Junit classpath or a config problem.
[snip]
It's definitely Friday - sorry - that was a stupid mistake!
Thanks,
ct
-
Seems your resource is not in the classpath.
Here is a hack for your maven.xml that should work:
By copying your test resources to target/test-classes you make them
available
in the test classpath.
CU,
Marcel
Ciaran Treanor wrote:
I've got a unit test that needs to read a data file, i.e
264 93 59
Fax: +32-(0)9 264 94 84
-Original Message-
From: Ciaran Treanor [mailto:[EMAIL PROTECTED]
Sent: vrijdag 5 december 2003 9:08
To: Maven Users List
Subject: JUnit and getResourceAsStream
I've got a unit test that needs to read a data file, i.e. InputStream in
= getClas
I've got a unit test that needs to read a data file, i.e.
InputStream in = getClass().getResourceAsStream("foo.xml");
Within Eclipse the file is found, however when running the
test from within Maven the resource is not found (i.e. in is null).
Any ideas?
ct