In this case, java.io.File means a actual file.
You could use the ExplodedImporter to import a directory into the archive.
This will import the directory into the root path:
If you want it in a none root path, I think a import into a temp archive and a merge to the original one is your best bet at the moment.
Archive<?> javaArchive = Archives.create("test.jar", JavaArchive.class); Archive<?> archive = Archives.create("test.jar", ExplodedImporter.class).importDirectory(myDirecotry); javaArchive.merge(archive, Paths.create("location"));
Aslak and I have recently had some discussions with intent to clear up "ResourceContainer".
Either way, I think adding a File directory is a valid case; please make a JIRA.
As a workaround, check out ExplodedImporter to import the directory in as an Archive. From there you can combine archives.