maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jamo Smith (JIRA)" <>
Subject [jira] Created: (SUREFIRE-286) ClassLoader.getSystemResource(String) returns null with valid resource
Date Fri, 09 Feb 2007 04:00:44 GMT
ClassLoader.getSystemResource(String) returns null with valid resource

                 Key: SUREFIRE-286
             Project: Maven Surefire
          Issue Type: Bug
          Components: classloading
    Affects Versions: 2.0 Report Plugin
         Environment: Windows XP
            Reporter: Jamo Smith
            Priority: Minor

src/main/java/org/mvntest/ does this:

URL url = ClassLoader.getSystemResource("tiny.gif");

tiny.gif is located in

a TestCase can be found in src/test/java/org/mvntest/
which fails with NPE (url is null)

I believe this TestCase ought to be successful, since tiny.gif should be in the classpath
during tests (how else do you have a simulated test environment?).  I tried placing tiny.gif
in src/main/java, src/test/java and src/test/resources with no luck anywhere.  Although I
believe this should work even if it is only in src/main/resources

A full, isolated, maven2 project is attached.

Thanks, and I hope I'm not over looking something.  If I am, I apologize in advance.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message