-
1. Re: Adding all files from a directory to an archive
aslak Aug 4, 2011 3:01 PM (in response to htfv)In the later ShrinkWrap versions you can do
addAsWebReosurce(new FIle("some directory"))
that should recursivly add the directory content..
-
2. Re: Adding all files from a directory to an archive
htfv Aug 9, 2011 5:43 AM (in response to aslak)It does not work. I checked ShrinkWraps source - File is simply wrapped (without any extra checks) in FileAsset which may return only one stream. Also, addAsWebResource for directory is strange, I would expect addAsWebResources (plural).
-
3. Re: Adding all files from a directory to an archive
booking59 Aug 27, 2011 8:28 PM (in response to htfv)This worked for me :
WebArchive war = ShrinkWrap.create(WebArchive.class)
.addPackages(true, "test")
.addAsResource("test-persistence", ArchivePaths.create("META-INF/persistence"))
.setWebXML(new StringAsset(webXml.contextParam(
ProjectStage.PROJECT_STAGE_PARAM_NAME,
ProjectStage.Development).exportAsString()))
.as(ExplodedImporter.class)
.importDirectory("src/main/webapp")
.as(WebArchive.class);
-
4. Re: Adding all files from a directory to an archive
aslak Aug 29, 2011 9:21 AM (in response to htfv)Which shrinkwrap and arquillian version are you using?