-
1. Re: Seam 2.3 with Arquillian
javacoryd Dec 10, 2012 3:33 PM (in response to javacoryd)So, after 2 days of trying to figure this out I found some sort of solution for this to at least get past this. So I have a simple ear with this layout:
some.ear
- some.war
....
- some.jar
....
This structure was exploded out like this in my "deploy_export" folder. I was hoping ShrinkWrap would take this structure and create the ear from it. However, it seems that for some reason, the sub-archives are not deployed correctly by creating the deployment this way. So, what I did was removed the war and the jar from the ear structure and put them into their own exploded directory. I then executed this deployment logic instead which makes calls to add the war and jar as a module. This deployed correctly.
EnterpriseArchive theEar = ShrinkWrap
.create(ExplodedImporter.class, "some.ear")
.importDirectory(
"C:/dev/workspaces/JBoss7/epic/deploy_export/some.ear/")
.as(EnterpriseArchive.class);
WebArchive theWar = ShrinkWrap
.create(ExplodedImporter.class, "some.war")
.importDirectory(
"C:/dev/workspaces/JBoss7/epic/deploy_export/some.war/")
.as(WebArchive.class);
JavaArchive theJar = ShrinkWrap
.create(ExplodedImporter.class, "some.jar")
.importDirectory(
"C:/dev/workspaces/JBoss7/epic/deploy_export/some.jar/")
.as(JavaArchive.class);
theJar.addClass(ArquillianTest.class);
theEar.addAsModule(theWar);
theEar.addAsModule(theJar);
System.out.println(theEar.toString(true));
return theEar;