Skip to content

Instantly share code, notes, and snippets.

@soucekv
Last active August 29, 2015 14:03
Show Gist options
  • Save soucekv/0b50b5ebeb0dafa73dd4 to your computer and use it in GitHub Desktop.
Save soucekv/0b50b5ebeb0dafa73dd4 to your computer and use it in GitHub Desktop.
public static WebArchive prepareArchive() throws Exception {
WebArchive war = ShrinkWrap.create(); //parms omitted
//add dependency to ShrinkWrap Resolver library
GenericArchive mockitoLib = Maven.configureResolver()
.resolve("org.mockito:mockito-all:1.8.4")
.withTransitivity().asSingle(GenericArchive.class);
war.addAsLibraries(mockitoLib);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment