Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Junit] Arquillian - how to export shrinkwrap archive
@RunWith(Arquillian.class)
public class WarSmokeTest {
@Deployment
public static Archive<?> createTestArchive() {
final MavenDependencyResolver resolver = DependencyResolvers.use(MavenDependencyResolver.class).loadMetadataFromPom("pom.xml");
final WebArchive archive = ShrinkWrap.create(WebArchive.class)
.addAsWebInfResource("META-INF/beans.xml")
///
.addAsResource("simple.property", "simple.property")
;
archive.as(ZipExporter.class).exportTo(new File("/" + archive.getName()), true);
return archive;
}
@Test
public void test() {
//
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment