I believed it too, but I have some problems with resources retrievedusing 
classpath in a multiproject application and discovered thatresources get added 
to the generated jar.

I searched maven documentation and found that it was the correct behaviour ???

I tried <testResource><excludes/>, but then resources are not copied to 
test-classes directory (so not available in unit test).

Jeff Lowe wrote:
> I believe that the <testResources> get copied into the
> /target/test-classes directory and are therefore available to the unit
> tests (as resources) when they run. Unlike resources in
> /target/classes, they don't get added to the generated jar. 
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 17, 2006 10:40 AM
> To: [email protected]
> Subject: [m2] Where to place resources for unit tests?
> 
> Hello,
> 
> I need some config files/resources for unit test, so I place them
> in"src/test/resources", but I don't want to include them in generated
> jar.
> 
> The description of <testResource> element of pom.xml states
> thatresources are used to complete the jar or to run unit test.
> 
> How can use this resources in test phase, but not include them in jar ?
> 
> Thanks.
> 
> 
> 
> _______________
> Siebel
> IT'S ALL ABOUT THE CUSTOMER
> Visit www.siebel.com


Reply via email to