If I put the persistence.xml in the src/test/META-INF folder, autodetection the Entities does not work with maven-verify. When the persistence.xml is located in the src/main/META-INF folder it works.
Running the tests in eclipse works in both cases.
Is there a way to get autodetection to work for maven-verify when the persistence.xml is located in the src/test Folder?
persistence.xml:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="Unit" transaction-type="RESOURCE_LOCAL">
<properties>
<!-- Scan for annotated classes and Hibernate mapping XML files -->
<property name="hibernate.archive.autodetection" value="class" />
</properties>
</persistence-unit>
</persistence>
See Question&Answers more detail:os