本文整理汇总了Java中org.jboss.shrinkwrap.api.GenericArchive类的典型用法代码示例。如果您正苦于以下问题:Java GenericArchive类的具体用法?Java GenericArchive怎么用?Java GenericArchive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GenericArchive类属于org.jboss.shrinkwrap.api包,在下文中一共展示了GenericArchive类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class)
// Se agrega las dependencias
.addAsLibraries(Maven.resolver().loadPomFromFile("pom.xml")
.importRuntimeDependencies().resolve()
.withTransitivity().asFile())
// Se agregan los compilados de los paquetes de servicios
.addPackage(AgencyResource.class.getPackage())
// El archivo que contiene la configuracion a la base de datos.
.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
// El archivo beans.xml es necesario para injeccion de dependencias.
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/beans.xml"))
// El archivo shiro.ini es necesario para injeccion de dependencias
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/shiro.ini"))
// El archivo web.xml es necesario para el despliegue de los servlets
.setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory("src/main/webapp").as(GenericArchive.class), "/");
}
开发者ID:Uniandes-MISO4203-backup,项目名称:turism-201620-2,代码行数:21,代码来源:AgencyIT.java
示例2: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class)
// Se agrega las dependencias
.addAsLibraries(Maven.resolver().loadPomFromFile("pom.xml")
.importRuntimeDependencies().resolve()
.withTransitivity().asFile())
// Se agregan los compilados de los paquetes de servicios
.addPackage(ProductResource.class.getPackage())
// El archivo que contiene la configuracion a la base de datos.
.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
// El archivo beans.xml es necesario para injeccion de dependencias.
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/beans.xml"))
// El archivo shiro.ini es necesario para injeccion de dependencias
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/shiro.ini"))
// El archivo web.xml es necesario para el despliegue de los servlets
.setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory("src/main/webapp").as(GenericArchive.class), "/");
}
开发者ID:Uniandes-MISO4203-backup,项目名称:turism-201620-2,代码行数:21,代码来源:ProductIT.java
示例3: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class)
// Se agrega las dependencias
.addAsLibraries(Maven.resolver().loadPomFromFile("pom.xml")
.importRuntimeDependencies().resolve()
.withTransitivity().asFile())
// Se agregan los compilados de los paquetes de servicios
.addPackage(ClientResource.class.getPackage())
// El archivo que contiene la configuracion a la base de datos.
.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
// El archivo beans.xml es necesario para injeccion de dependencias.
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/beans.xml"))
// El archivo shiro.ini es necesario para injeccion de dependencias
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/shiro.ini"))
// El archivo web.xml es necesario para el despliegue de los servlets
.setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory("src/main/webapp").as(GenericArchive.class), "/");
}
开发者ID:Uniandes-MISO4203-backup,项目名称:turism-201620-2,代码行数:21,代码来源:ClientIT.java
示例4: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class)
// Se agrega las dependencias
.addAsLibraries(Maven.resolver().loadPomFromFile("pom.xml")
.importRuntimeDependencies().resolve()
.withTransitivity().asFile())
// Se agregan los compilados de los paquetes de servicios
.addPackage(CategoryResource.class.getPackage())
// El archivo que contiene la configuracion a la base de datos.
.addAsResource("META-INF/persistence.xml", "META-INF/persistence.xml")
// El archivo beans.xml es necesario para injeccion de dependencias.
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/beans.xml"))
// El archivo shiro.ini es necesario para injeccion de dependencias
.addAsWebInfResource(new File("src/main/webapp/WEB-INF/shiro.ini"))
// El archivo web.xml es necesario para el despliegue de los servlets
.setWebXML(new File("src/main/webapp/WEB-INF/web.xml"))
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory("src/main/webapp").as(GenericArchive.class), "/");
}
开发者ID:Uniandes-MISO4203-backup,项目名称:turism-201620-2,代码行数:21,代码来源:CategoryIT.java
示例5: writeFaultSeqArchive
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public GenericArchive writeFaultSeqArchive(Domain domain, List<Contingency> contingencies, Network network, EurostagDictionary dictionary, Function<Integer, String> seqFileNameFct) throws IOException {
if ((contingencies == null) || (contingencies.isEmpty())) {
throw new RuntimeException("contingencies list is empty, cannot write .seq scenario files");
}
GenericArchive archive = domain.getArchiveFactory().create(GenericArchive.class);
try (FileSystem fileSystem = ShrinkWrapFileSystems.newFileSystem(archive)) {
Path rootDir = fileSystem.getPath("/");
for (int i = 0; i < contingencies.size(); i++) {
Contingency contingency = contingencies.get(i);
Path seqFile = rootDir.resolve(seqFileNameFct.apply(i));
try (BufferedWriter writer = Files.newBufferedWriter(seqFile, StandardCharsets.UTF_8)) {
writeFaultSeq(writer, contingency, network, dictionary);
}
}
}
return archive;
}
开发者ID:itesla,项目名称:ipst,代码行数:18,代码来源:EurostagScenario.java
示例6: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment
public static Archive<?> createDeployment() {
GenericArchive qunitFiles = ShrinkWrap.create( GenericArchive.class )
.as( ExplodedImporter.class )
.importDirectory( "bower_components/js-cookie/" )
.as( GenericArchive.class );
WebArchive war = IntegrationUtils.createCommonDeployment()
.merge( qunitFiles, "/", Filters.includeAll() )
.addAsWebInfResource(
new File( "src/test/resources/web.xml" ),
"web.xml"
);
System.out.println( " ----- LOGGING THE FILES ADDED TO JBOSS" );
System.out.println( war.toString( true ) );
System.out.println( " ----- END OF LOGGING THE FILES ADDED TO JBOSS" );
return war;
}
开发者ID:js-cookie,项目名称:java-cookie,代码行数:21,代码来源:CookiesEncodingIT.java
示例7: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment
public static Archive createDeployment()
{
final GenericArchive webResources = ShrinkWrap.create(GenericArchive.class)
.as(ExplodedImporter.class)
.importDirectory("src/main/webapp")
.as(GenericArchive.class);
final File[] seleniumApi = Maven.resolver()
.loadPomFromFile("pom.xml")
.resolve("org.seleniumhq.selenium:selenium-api:2.35.0")
.withTransitivity()
.asFile();
return ShrinkWrap.create(WebArchive.class, NoteResourceImplTest.class.getSimpleName() + ".war")
.addClasses(Note.class, NoteApp.class, NoteResource.class, NoteResourceImpl.class)
.addAsResource("META-INF/persistence.xml")
.addAsLibraries(seleniumApi)
.merge(webResources);
}
开发者ID:ftomassetti,项目名称:JavaIncrementalParser,代码行数:19,代码来源:NoteResourceImplTest.java
示例8: createSpecialtiesDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createSpecialtiesDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
WebArchive war = null;
try {
war = ShrinkWrap.create(WebArchive.class, "specialties.war")
.addClasses(SpecialtyController.class, LanguageBean.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class,
net.sourceforge.cobertura.coveragedata.LightClassmapListener.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.2\"/>"),
"faces-config.xml");
} catch (Exception e) {
e.printStackTrace();
}
return war;
}
开发者ID:phasenraum2010,项目名称:javaee7-petclinic,代码行数:26,代码来源:Deployments.java
示例9: createPetTypeDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createPetTypeDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "pettypes.war")
.addClasses(PetTypeController.class, LanguageBean.class,
PetTypeDao.class, PetTypeDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class,
net.sourceforge.cobertura.coveragedata.LightClassmapListener.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.2\"/>"),
"faces-config.xml");
}
开发者ID:phasenraum2010,项目名称:javaee7-petclinic,代码行数:20,代码来源:Deployments.java
示例10: createVetDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createVetDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "vet.war")
.addClasses(
SpecialtyController.class, VetController.class, LanguageBean.class,
SpecialtyConverter.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
VetDao.class, VetDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class,
VetSortingBean.class,
net.sourceforge.cobertura.coveragedata.LightClassmapListener.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.2\"/>"),
"faces-config.xml");
}
开发者ID:phasenraum2010,项目名称:javaee7-petclinic,代码行数:24,代码来源:Deployments.java
示例11: createSpecialtiesDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createSpecialtiesDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
WebArchive war = null;
try {
war = ShrinkWrap.create(WebArchive.class, "specialties.war")
.addClasses(SpecialtyController.class, LanguageBean.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
} catch (Exception e) {
e.printStackTrace();
}
return war;
}
开发者ID:phasenraum2010,项目名称:jee6-petclinic,代码行数:25,代码来源:Deployments.java
示例12: createPetTypeDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createPetTypeDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "pettypes.war")
.addClasses(PetTypeController.class, LanguageBean.class,
PetTypeDao.class, PetTypeDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
}
开发者ID:phasenraum2010,项目名称:jee6-petclinic,代码行数:19,代码来源:Deployments.java
示例13: createVetDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createVetDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "vet.war")
.addClasses(
SpecialtyController.class, VetController.class, LanguageBean.class,
SpecialtyConverter.class, SpecialtyParser.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
VetDao.class, VetDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
}
开发者ID:phasenraum2010,项目名称:jee6-petclinic,代码行数:22,代码来源:Deployments.java
示例14: createOwnerDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
public static WebArchive createOwnerDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
WebArchive war = null;
try {
war = ShrinkWrap.create(WebArchive.class, "owner.war")
.addClasses(OwnerController.class, PetTypeController.class, LanguageBean.class,
OwnerDao.class, OwnerDaoImpl.class, PetDao.class, PetDaoImpl.class,
VisitDao.class, VisitDaoImpl.class,
PetTypeDao.class, PetTypeDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
} catch (Exception e) {
e.printStackTrace();
}
return war;
}
开发者ID:phasenraum2010,项目名称:jee6-petclinic,代码行数:27,代码来源:Deployments.java
示例15: createTestArchive2
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment(name = APP_NAME, order = 2, testable = false)
public static Archive<?> createTestArchive2() throws IOException {
WebArchive war = ShrinkWrap.create(WebArchive.class, "app-angular2.war")
.addAsWebResource(new StringAsset(createClient(ClientBuilder.create(APP_NAME)
.rootUrl(ROOT_URL)
.accessType(PUBLIC))), "keycloak.json");
war.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/",
Filters.includeAll());
return war;
}
开发者ID:nmajorov,项目名称:keycloak_training,代码行数:13,代码来源:ArquillianAngular2Test.java
示例16: createDeployment
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Deployment(testable = false)
public static WebArchive createDeployment() {
File[] extraJars = Maven.resolver().loadPomFromFile("pom.xml")
.resolve(
"org.projectlombok:lombok:1.16.8",
// "org.modelmapper:modelmapper:0.7.5",
// "org.apache.commons:commons-lang3:3.4",
// "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.6.3",
"io.jsonwebtoken:jjwt:0.8.0"
)
.withTransitivity()
.asFile();
final WebArchive war = ShrinkWrap.create(WebArchive.class, "test.war")
.addAsLibraries(extraJars)
.addPackages(true, Bootstrap.class.getPackage())
// .addAsResource("test-log4j.properties", "log4j.properties")
//Add JPA persistence configration.
//WARN: In a war package, persistence.xml should be put into /WEB-INF/classes/META-INF/, not /META-INF
//.addAsManifestResource("META-INF/test-persistence.xml", "persistence.xml")
.addAsResource("META-INF/persistence.xml")
.addAsResource("META-INF/orm.xml");
// .addAsWebInfResource("test-web.xml", "web.xml")
// // Enable CDI
// .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
// .addAsWebInfResource("test-jboss-deployment-structure.xml", "jboss-deployment-structure.xml");
war.merge(
ShrinkWrap.create(GenericArchive.class)
.as(ExplodedImporter.class)
.importDirectory("src/main/webapp")
.as(GenericArchive.class),
"/"
);
LOG.log(Level.INFO, "war to string @{0}", war.toString(true));
return war;
}
开发者ID:hantsy,项目名称:javaee8-jaxrs-sample,代码行数:39,代码来源:EdgeResourceIT.java
示例17: writeDtaAndControls
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
private void writeDtaAndControls(Domain domain, OutputStream ddbOs, OutputStream dictGensOs) throws IOException {
GenericArchive archive = domain.getArchiveFactory().create(GenericArchive.class);
try (FileSystem fileSystem = ShrinkWrapFileSystems.newFileSystem(archive)) {
Path rootDir = fileSystem.getPath("/");
ddbClient.dumpDtaFile(rootDir, DTA_FILE_NAME, network, parallelIndexes.toMap(), EurostagUtil.VERSION, dictionary.toMap());
}
archive.as(ZipExporter.class).exportTo(ddbOs);
//put just the generators dict csv file (extracted from the ddb files) in the common files set, to be used by wp43 transient stability index
if (archive.get(DDB_DICT_GENS_CSV) != null) {
ByteStreams.copy(archive.get(DDB_DICT_GENS_CSV).getAsset().openStream(), dictGensOs);
} else {
LOGGER.warn(DDB_DICT_GENS_CSV + " is missing in the dynamic data files set: some security indexers (e.g. transient stability) need this file");
}
}
开发者ID:itesla,项目名称:ipst,代码行数:15,代码来源:EurostagStabilization.java
示例18: writeWp43Configs
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
private void writeWp43Configs(Domain domain, List<Contingency> contingencies, OutputStream os) throws IOException, ConfigurationException {
// copy wp43 configuration files
GenericArchive archive = domain.getArchiveFactory().create(GenericArchive.class);
try (FileSystem fileSystem = ShrinkWrapFileSystems.newFileSystem(archive)) {
Path rootDir = fileSystem.getPath("/");
writeWp43Configs(contingencies, rootDir);
}
archive.as(ZipExporter.class).exportTo(os);
}
开发者ID:itesla,项目名称:ipst,代码行数:10,代码来源:EurostagImpactAnalysis.java
示例19: applyPatch
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
@Test
@InSequence(2)
public void applyPatch() throws Exception {
File patchZip = tmp.newFile("test-patch.zip");
String serverName = "WildFly";
ModelNodeResult serverNameResult = ops.readAttribute(Address.root(), "product-name");
if (serverNameResult.hasDefinedValue()) {
serverName = serverNameResult.stringValue();
}
ModelNodeResult serverVersionResult = ops.readAttribute(Address.root(), "product-version");
if (!serverVersionResult.hasDefinedValue()) { // happens on WildFly 8
serverVersionResult = ops.readAttribute(Address.root(), "release-version");
}
serverVersionResult.assertDefinedValue("Server version required for generating a test patch");
String serverVersion = serverVersionResult.stringValue();
GenericArchive zip = ShrinkWrap.create(ZipImporter.class)
.importFrom(ApplyRollbackExistingPatchTest.class.getResourceAsStream("test-patch.zip.template"))
.as(GenericArchive.class);
String patchXml = new AssetByteSource(zip.delete("patch.xml").getAsset()).asCharSource(Charsets.UTF_8).read();
String newPatchXml = patchXml
.replace("%EAP_NAME%", serverName)
.replace("%EAP_VERSION_ORIG%", serverVersion)
.replace("%EAP_VERSION_NEW%", serverVersion + "_PATCHED");
zip.add(new StringAsset(newPatchXml), "patch.xml");
zip.as(ZipExporter.class).exportTo(patchZip, true);
client.apply(new ApplyPatch.Builder(patchZip).build());
}
开发者ID:wildfly-extras,项目名称:creaper,代码行数:32,代码来源:ApplyRollbackExistingPatchTest.java
示例20: fetchFromMavenRepository
import org.jboss.shrinkwrap.api.GenericArchive; //导入依赖的package包/类
private File fetchFromMavenRepository(ExecutorService executor) {
final MavenCoordinate distributableCoordinate = toMavenCoordinate(targetAdapter.distribution());
if (distributableCoordinate != null) {
final File targetDirectory = new File(new File(distributionDownloadFolder, "server"),
distributableCoordinate.getArtifactId() + "_" + distributableCoordinate.getVersion());
if (serverAlreadyDownloaded(targetDirectory)) {
return getDistributionHome(targetDirectory);
}
System.out.println(
"Arquillian Chameleon: downloading distribution " + distributableCoordinate.toCanonicalForm());
Future<File> uncompressDirectory = executor.submit(new Callable<File>() {
@Override
public File call() throws Exception {
return Maven.resolver().resolve(distributableCoordinate.toCanonicalForm())
.withoutTransitivity()
.asSingle(GenericArchive.class)
.as(ExplodedExporter.class)
.exportExploded(targetDirectory, ".");
}
});
try {
while (!uncompressDirectory.isDone()) {
System.out.print(PROGRESS_INDICATOR);
Thread.sleep(HALF_A_SECOND);
}
System.out.println();
return getDistributionHome(uncompressDirectory.get());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
return null;
}
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:38,代码来源:DistributionController.java
注:本文中的org.jboss.shrinkwrap.api.GenericArchive类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论