I am deploying a war into JBoss 7.x using Arquillian for testing and it has a dependency on Apache Commons Collections. However, it just doesn't seem to pick up the module dependency.
MANIFEST.MF
Dependencies: org.apache.commons.collectionss export
Arquillian Deployment
@Deployment
public static Archive<?> createDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class);
archive
.addPackages(true, "com.example.package")
.addAsResource("META-INF/MANIFEST.MF", "META-INF/MANIFEST.MF")
// * Tried the following two options with no luck
//.AddAsManifestResource("META-INF/MANIFEST.MF", "MANIFEST.MF")
//.AddAsWebInfResource("META-INF/MANIFEST.MF", "META-INF/MANIFEST.MF")
// * If I enable the following, it works fine. getLibrary just picks
// * up the lib through maven.
//.addAsLibraries(
// getLibrary("commons-collections:commons-collections:3.2.1"))
;
return archive;
}
I don't want to use jboss-deployment-structure.xml
since it feels like using a sledgehammer to crack a nut.
Any ideas?