Thanks Wendy.  I finally realized the error of my ways.  I was expecting
that "src/test/resources" would be put in the runtime classpath for
testing.  Instead, I see that the contents of "src/test/resources" are
copied into the "target/test-classes" directory, which is already in the
classpath.  My issue was really a classloader issue in my code, having
nothing to do with Maven.



 

-----Original Message-----
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 04, 2006 3:18 PM
To: Maven Users List
Subject: Re: Resource path for testing?

On 1/4/06, Jeff Lowe <[EMAIL PROTECTED]> wrote:

> Some of my unit tests need to access files as resources, which are 
> sitting in a directory within the source tree.  Is there a setting for

> testing, where I can add a directory to the classpath, which will 
> allow the tests to access the files?

Assuming you're on Maven 2, here's an example of using <testResources>
to add files outside of the standard src/test/resources directory:

   http://svn.apache.org/repos/asf/struts/action/trunk/pom.xml

--
Wendy

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




_______________
Siebel
IT'S ALL ABOUT THE CUSTOMER
Visit www.siebel.com

This e-mail message is for the sole use of the intended recipient(s) and 
contains confidential and/or privileged information belonging to Siebel 
Systems, Inc. or its customers or partners. Any unauthorized review, use, 
copying, disclosure or distribution of this message is strictly prohibited. If 
you are not an intended recipient of this message, please contact the sender by 
reply e-mail and destroy all soft and hard copies of the message and any 
attachments. Thank you for your cooperation.


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

Reply via email to