If you install the m2eclipse plugin, it will (among other cool things)
automatically update your .classpath file to use the src/test/resources
directory.


On Wed, 3 Jun 2009 09:26:13 -0500, Herbert Wu <[email protected]> wrote:
> Great, it worked. I can easily adjust Eclipse IDE to look for
> src/test/resources/ to make both mvn and IDE working.
> Thanks a lot!
> -Herbert
> 
> On Tue, Jun 2, 2009 at 3:50 PM, Herbert Wu <[email protected]> wrote:
> 
>> Sorry for the rookie question as I am just learning Maven and had
>> difficulty to find an answer for a simple spring cfg file issue:
>>
>> In my unit test, I placed the unit-test spring-bean xml file
>> client-config.xml in src/test/com/demo folder, and how to instruct maven
>> classloader to load from this folder?
>>
>> This is the annotated Spring unit test code that uses classpath to load
>> the
>> spring-bean client-config.xml( Eclipse IDE loads it fine).
>> @ContextConfiguration(locations =
>> {"classpath:com/demo/client-config.xml"})
>> @RunWith(SpringJUnit4ClassRunner.class)
>> public class HelloWorldAnnotationTest {
>> ...
>> }
>>
>> But "mvn test" apparently only looks target\test-classes\com\demo path -
>> not src/test/com/demo path, and complains client-config.xml file not
>> found.
>>
>> Thanks
>> -Herbert
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to