There are two issues here, both of which may be too specific to more complicated EAR
deployments to be worth fixing in the projects that jboss tools generates in its wizard.
(1) I'm using junit rather than testng, because the latter's output leaves much to
be desired, and we have testing tools that work with junit's xml output. Junit
respects the "Exported" checkbox set in the the "Order and Export"
section of the Java Build Path. Testng must not. Because if I don't check to export
the EAR directories to dependent projects in the build path for the WAR, then the tests
running from the test project don't find the ear directories. The jboss tools
don't check this box by default.
(2) I have an EJB that depends on Utility jars in the Ear. The EJB lists those in its
Manifest.MF. The WAR _doesn't_ list those in its Manifest.MF, because it doesn't
need them, and it is sometimes packaged in a different EAR without those libs present.
Now, in order to have the test project find the libs on the classpath in order to test the
EJB module, I have to include those utility libs in the MANIFEST.MF of the WAR, so that
they get picked up by the test project. Does that make sense?
So I guess what I'd like to see: The test project is testing dependent EJB modules
and the WAR module. The latter both pick up Utility Jar dependencies through Manifest.MF
and EarContent, via that whizzy "EAR Libraries" thing. It would be nice if the
test project did that as well.
I'm new to the WST tools; for the past couple years they were too broken to really
use, in my opinion. So perhaps the above comments reflect my own ignorance of how to best
use these tools to manage dependencies between projects.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139109#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...