Created
March 14, 2012 11:42
-
-
Save milenkovicm/2035949 to your computer and use it in GitHub Desktop.
[Junit] Arquillian - how to export shrinkwrap archive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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