>> 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.
It's working for me as expected, using the following structure: - src ---- main -------- resources ---- test -------- resources src/main/resources get copied into the jar. src/test/resources do not get copied into the jar, and are available to the unit tests. My POM is relatively empty. This is default behavior. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 5:49 AM To: [email protected] Subject: Re: [m2] Where to place resources for unit tests? 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
