Interesting, when I remove the file in the src/main/resources then the one
in src/test/resources gets picked up... I've been playing with it for an
hour and a half.. checking and double checking and it appears as though main
resources is overriding the test resources.  I never had this problem
before. I'm starting to wonder if there are weird classloading stuff going
on depending on what jar is trying to access a resource.

On 8/8/07, Eric Redmond <[EMAIL PROTECTED]> wrote:
>
> testResources files get copied to the testOutputDirectory. Using surefire,
> the testOutputDirecotry files should take precedence.
>
> --
> Eric Redmond
> http://blog.propellors.net
>
> On 8/8/07, Ryan Moquin <[EMAIL PROTECTED]> wrote:
> >
> > If I have this in my pom:
> >
> > ....
> > <build>
> > <resources>
> >       <resource>
> >         <directory>src/main/resources</directory>
> >       </resource>
> >     </resources>
> >     <testResources>
> >       <testResource>
> >         <directory>/src/test/resources</directory>
> >       </testResource>
> >     </testResources>
> > </build>
> > ....
> >
> > If I have a file such as hibernate.cfg.xml in both locations, but with
> > different parameters... which one will take precedence during unit
> tests?
> > From I can see, it seems like only the one in the src/main/resources
> takes
> > effect.
> >
> > Do you have to do anything specific to make this work how I would
> expect?
> >
> > Thanks.
> >
>

Reply via email to