Alrighty I have made good progress!
It works!

Sorta...

There seems to be a problem with either Embedded JBoss or Maven (most likely 
Maven).
As an aside, I had to roll back to Embedded JBoss beta2 as beta3 was failing 
with JMS related stuff.

The example application will fail to build, complaining about no default 
persistence unit in the deployment, which is due to the test classpath not 
including the src/test/resources/META-INF/persistence.xml

To make it work copy or move this file to 
src/main/resources/META-INF/persistence.xml

I'm confused why it isn't working as the META-INF directory in the test 
resources does contain another file that is picked up during the test by JBoss 
Embedded.

So it appears that Maven (or Embedded JBoss) is ignoring the persistence.xml 
file in the test resources!??

This is using Maven 2.0.8 which explicitly states in its release notes: 
anonymous wrote :  MNG-3118 - Test-classes should come before classes in the 
classpath. This may slightly alter behavior of tests. The test-classes is now 
included first in the classpath to allow test resources to override normal 
runtime ones.

I do not want to use filters in Maven as this file should only be used in unit 
tests and not included in any packaged artifacts.

The updated example can be downloaded from here:
http://www.users.on.net/~cory_prowse/seamMavenExample-20080104.zip

I'm going to post the example app to the Maven users mailing list and see if 
anyone there knows what is going on.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116922#4116922

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116922
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to