当前位置: 首页>>代码示例>>Java>>正文


Java GenericArchive类代码示例

本文整理汇总了Java中org.jboss.shrinkwrap.api.GenericArchive的典型用法代码示例。如果您正苦于以下问题:Java GenericArchive类的具体用法?Java GenericArchive怎么用?Java GenericArchive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GenericArchive类属于org.jboss.shrinkwrap.api包,在下文中一共展示了GenericArchive类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的org.jboss.shrinkwrap.api.GenericArchive类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。