On Fri, 1 Jul 2005, Erick Dovale wrote:
You should remove the targetPath directive.
Say you've got a resource source/testSrc/resources/A.
This is copied to target/test-classes/resources/A.
Your resource is accessible under /resources/A (using
ClassLoader.findResource e.a.).
Normally you add the files under resources/ to the root of your classes
directory, so in this case A would be target/test-classes/A.
This is the preferred way usually; what if you need to create a WAR
and have some resources in /WEB-INF/? That dir would be in
sources/testSrc/resources/WEB-INF/ and should end up in
target/test-classes/WEB-INF/. Same goes for META-INF.
Greetings,
Kenney Westerhof
>
> Yes, that is exactly what I told maven and it actually does it. The only
> problem is that the resources folder is not added to the classpath and
> therefore no resource into the folder is being found by my testes.
> The paths don't seem to be wrong as every single resource gets copied to
> target/classes/resources and to target/test-classes/resources.
> Perhaps there is a different way to achieve this??
>
> -----Original Message-----
> From: Jörg Schaible [mailto:[EMAIL PROTECTED]
> Sent: July 1, 2005 2:06 AM
> To: Maven Users List
> Subject: RE: Resources not being found by test plugin
>
> Erick Dovale wrote on Thursday, June 30, 2005 6:56 PM:
>
> > Btw, the repeated resources in POM was removed and problem persisted.
> > It seems like the classpath is not been properly constructed.
> > Has anyone had this issue before.
>
> Only, if the paths are wrong.
>
> > I am using Maven 1.0.2
>
> Me too.
>
> [snip]
>
> > <unitTestSourceDirectory>source/testSrc</unitTestSourceDirectory>
> > <unitTest> <includes>
> > <include>**/*Test.java</include>
> > </includes>
> > <resources>
> > <resource>
> > <directory>resources</directory>
> > <filtering>false</filtering>
> > <includes>
> >
> > <include>**/*</include>
> > </includes>
> > <targetPath>resources</targetPath>
> > </resource>
> > <resource>
> > <directory>resources</directory>
> > <filtering>false</filtering>
> > <includes>
> >
> > <include>**/*</include>
> > </includes>
> > <targetPath>resources</targetPath>
> > </resource>
> > </resources>
> > </unitTest>
> > <resources>
> > <resource>
> > <directory>resources</directory>
> > <targetPath>resources</targetPath>
> > <filtering>false</filtering>
> > <includes>
> > <include>**/*</include>
> > </includes>
> > </resource>
> > </resources>
> > </build>
>
> [snip]
>
> So you have a "resources" directory in your project root? And you want your
> resources to be copied into target/classes/resources and as well into
> target/test-classes/resources? That's what you've told Maven.
>
> - Jörg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/35 - Release Date: 30/06/2005
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]