The seam-gen project structure lets you have distinct persistence setups for the various profiles (dev/prod/test):
persistence-${profile}.xml
import-${profile}.sql
${project}-${profile}-ds.xml
But my project was generated with JBoss Tools, which seems to have trashed the rails-inspired profile-differentiation idea. It does let you define a different datasource for testing:
${project}-test-ds.xml
But what if I want a different persistence.xml and import.sql? Eg, I want to populate the tables with test data, and I want to set hbm2ddl.auto to create-drop instead of update? Or I want to use the DefaultDS for testing?
I tried putting a persistence.xml in test-src/META-INF, but that resulted in a schema export failed
error.
Best to ask this in the JBoss Tools forum so the devs there can properly address your question.