A JavaArchive can't contain Libraries, so no.
You can always force them in, but probably won't be understood by the Container. e..g .addAsResource(new File("my-library.jar"))
I was wondering that. But in this case, what's the best practice?Using WebArchive?
1 of 1 people found this helpful
I built my testable java arcive then put it with the needed libraries in an ear.
The best practice would probably be to use the packaging type that best fit your application / test.
Is your final product a EAR, and your Test is relying on a EAR structure, use a EAR. If the final is a WAR, then use a WAR.
Ok, thanks everyone.