I'm very close to get my Maven 2 /SEAM structure right to my needs, here after a summary of my MVN modules:
ear ejb war pojo-domain int-tests
my persistence entities are in pojo-domain, my persistence.xml in ejb. I specify the <jar-file> element in the persistence.xml file to force scanning of pojo-domain for entities. Everything works perfectly fine when I deployed my ear to my outside JBoss 5.1.0.GA server. However I have the following exception when running my integration tests:
org.hibernate.ejb.packaging.InputStreamZippedJarVisitor] Unable to find file (ignored): vfsjar:file:/home/frank/.m2/repository/com/mycompany/myproject-ejb/0.0.1-SNAPSHOT/myproject-ejb-0.0.1-SNAPSHOT.jar!/myproject-pojo-domain-0.0.1-SNAPSHOT.jar
If I tried to manually copy my entities from pojo-domain to the ejb project and remove the <jar-file> element from persistence.xml then everything works perfectly in embedded mode, my entities get detected by hibernate and all the Seam components get loaded without problems.
If anybody gets an idea I'll really (really) appreciate.