« Return to Thread: Maven2 test not finding src/resources/META-INF/persistence.xml

Maven2 test not finding src/resources/META-INF/persistence.xml

by Ryan de Laplante :: Rate this Message:

Reply to Author | View in Thread

This message is cross posted in nbusers mailing list. I just remembered someone telling me that this mailing list is more appropriate for maven questions.  

Hi,

I have a maven2 project and has a persistence.xml in  src/main/resources/META-INF/ and src/test/resources/META-INF/.   I've got a dependency on TopLink JPA provider configured. When I execute the test it uses the persistence.xml from main instead of test folder.  When I rename the main persistence.xml (leaving the test one named properly), then no persistence.xml is found.

Any idea what is happening?

FYI Spring 2.5.5 is the JPA container. It is trying to initialize a PU to inject it into an entityManagerFactory bean.


Thanks,
Ryan

 « Return to Thread: Maven2 test not finding src/resources/META-INF/persistence.xml