I appreciate that many people tried to help out with suggestions, but
none of them seemed to work.
I have created a test case that shows how the JUnit test fails under
Surefire (with Maven 2.0.3), and succeeds in Eclipse using Maven
2.0.3's eclipse:eclipse, both using the same pom.xml. The test case
and detailed instructions are attached to JIRA ticket SUREFIRE-38.
The problem may be related to the fact that Surefire resets the
java.class.path so EJB3 embeddable container cannot find the
annotations. I may test this hypothesis today.
I have spent many days on this problem, mainly because I want to
convert our EJB3 application from Maven 1.0.2 to Maven 2. I also
contributed a fix to the Maven 2 ejb plugin, which is required to
build EJB3 components. Sure could use some help on this.
Dan R. Greening, Ph.D., CEO BigTribe Corporation, http://
dan.greening.name/contact.htm
On Mar 19, 2006, at 11:16 AM, Dan Greening wrote:
I am pulling my hair out.
If you have gotten maven2 surefire plugin (or anything else) to
initiate a JBoss EJB3 embeddable container, I am desperate for your
POM.
I am trying very hard to get the JBoss EJB3 embeddable container to
operate under the surefire-plugin, under the test phase. I cannot,
for the life of me, get it to find the InitialContext. I've set
the system properties properly, and I even have a duplicated it in
jndi.properties. My configuration works under maven1, but not maven2.
I think it could be caused by one of two things. Either
a. The surefire plugin isolated classloader is making it impossible
for the embeddable container to find the annotated classes.
b. I have screwed up my POM somehow.
If all you tell me is "yes, I have gotten the JBoss EJB3 embeddable
container to run and see my classes under surefire", you will have
done me a favor, because that would indicate it is possible.
However, it would be really nice if you would also send your POM so
I could understand your configuration.
Seriously, this has been driving me nuts for days, so I could
really use the help.
Dan R. Greening, Ph.D., CEO BigTribe Corporation, http://
dan.greening.name/contact.htm