Skip to content

Instantly share code, notes, and snippets.

@ALRubinger
Created March 3, 2014 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ALRubinger/9321630 to your computer and use it in GitHub Desktop.
Save ALRubinger/9321630 to your computer and use it in GitHub Desktop.
String name = "test.jar";
ArchivePath path = ArchivePaths.create("WEB-INF/lib", name);
JavaArchive war = ShrinkWrap.create(JavaArchive.class)
.add(
ShrinkWrap.create(JavaArchive.class, name)
.add(EmptyAsset.INSTANCE, "some"), path, ZipExporter.class);
Assert.assertTrue(war.contains(path));
war.delete(path);
Assert.assertFalse("Path should have been deleted", war.contains(path));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment