SomeTest.class.getResourceAsStream (or
getClass().getResourceAsStream()) would work just as effectively. This
is how I would do it whether I was using Maven or not.
This is not a "weird thing" - Maven doesn't shove everything onto the
system classloader, it builds up its own.
- Brett
On Fri, 18
In case anyone is following this thread or finds it while solving their own problem in
the future,
here is what I ended up having to do:
InputStream is =
Thread.currentThread().getContextClassLoader()
.getResourceAsStream(testResource);
Apparentl
Yes, the call simply returns null. It really doesn't make much sense. When I run
maven with the
-X option I can see the path being included, but when I try to access the resource, I
get null.
WM
--- Dion Gillard <[EMAIL PROTECTED]> wrote:
> The resources aren't on the system classloader?
>
>
The resources aren't on the system classloader?
On Thu, 17 Jun 2004 12:39:04 -0700 (PDT), Webb Morris
<[EMAIL PROTECTED]> wrote:
>
> I have set up some resources for my unit tests in the unittest/resources area of my
> project.xml.
> These resources are being correctly copied to the target/test-
I have set up some resources for my unit tests in the unittest/resources area of my
project.xml.
These resources are being correctly copied to the target/test-classes directory.
However, when I
try to access these resources using:
ClassLoader.getSystemResourceAsStream(myresource)
The resource