Hi all,

I am testing a class that is using a .properties file that I have
placed in src\main\resources.  I am loading it via:

InputStream is =
getClass().getClassLoader().getResourceAsStream("add.properties");

The .properties file gets copied to target\classes\add.properties, and
when I create a package and run the class everything works fine.  The
problem is if I try to run a junit test against the class, at that
point the class cannot find the .properties file.

I ran mvn test with -X and got the following:

[DEBUG] Test Classpath :
[DEBUG]   C:\Projects\Experiments\add-test\target\test-classes
[DEBUG]   C:\Projects\Experiments\add-test\target\classes
[DEBUG]   C:\Documents and
Settings\rwenderlich\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar

I am using a basic POM I generated with the mvn archetype:create, so
I'm using the default resources settings.  I am using Maven 2.0.8.

Any ideas what's going on here?  I've read the other forum postings on
the subject and tried a bunch of different things to no avail.

Thanks!

--Ray

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to