[
https://issues.jboss.org/browse/SHRINKWRAP-193?page=com.atlassian.jira.pl...
]
Davide D'Alto commented on SHRINKWRAP-193:
------------------------------------------
Hi,
looking the existing importers I thought something like this might work:
{code}
WebArchive war = ShrinkWrap
.create(WebArchive.class)
.addAsLibrary(TestIOUtil.createFileFromResourceName("cl-test.jar"));
JavaArchive jar = ShrinkWrap
.create(ZipImporter.class, "cl-test.jar")
.importFrom(war, "WEB-INF/lib/cl-test.jar")
.as(JavaArchive.class)
;
{code}
Let me know what you think (
https://github.com/DavideD/shrinkwrap/commits/SHRINKWRAP-193)
Cheers!
Should be able to 'mount' a added jar
-------------------------------------
Key: SHRINKWRAP-193
URL:
https://issues.jboss.org/browse/SHRINKWRAP-193
Project: ShrinkWrap
Issue Type: Feature Request
Components: api, impl-base
Reporter: Aslak Knutsen
Assignee: Davide D'Alto
You can only manipulate on ShrinkWrap(open/uncompressed) archives when they are
ArchiveAssets. Some times it can be useful to manipulate an existing(closed/compressed)
nested archive. Add something to a library added by 'someone' else... We should
support to import/mount a already added compressed library.
[code]
WebArchive war = ShrinkWrap.create(WebArchive.class)
.addLibrary(new File("blag.jar"))
JavaArchive jar = war.as(Importer.class)
.import(
JavaArchive.class,
Archivepaths.create("lib/blag.jar"))
[code]
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira