| Author |
OpenEJB + JUnit + Ant
|
Marcus Didius Falco
Ranch Hand
Joined: Feb 25, 2007
Posts: 72
|
|
I have recently begun to write JUnit Tests for EJBs using OpenEJB.
From within Eclipse it works like a charm.
However cannot make it work from my Ant Script.
In the examples supplied with OpenEJB it stated that:
"As long as OpenEJB and it's required libraries are in the
<junit> classpath, the tests will run with OpenEJB embedded."
I don't think my tests run with OpenEJB embedded, because the tests fail for every class which uses dependency injection:
My ant script:
The classpath used for running the Junit test is (from the echo in target "test")
Clearly the OpenEJB jars are in the classpath.
Any ideas what I am doing wrong?
Many thanks,
Hans
|
 |
Marcus Didius Falco
Ranch Hand
Joined: Feb 25, 2007
Posts: 72
|
|
I found out for myself:
You have to copy the META-INF directory with ejb-jar.xml into the build directory of your project classes.
|
 |
 |
|
|
subject: OpenEJB + JUnit + Ant
|
|
|