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


Java ShrinkWrap.create方法代码示例

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


在下文中一共展示了ShrinkWrap.create方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
    // Instantiate the container
    Swarm swarm = new Swarm(args);

    // Create one or more deployments
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);

    // Add resource to deployment
    deployment.addPackage(Main.class.getPackage());
    deployment.addAllDependencies();

    // Add Web resources
    deployment.addAsWebResource(
            new ClassLoaderAsset("src/main/webapp/index.html", Main.class.getClassLoader()), "src/main/webapp/index.html");
    deployment.addAsWebInfResource(
            new ClassLoaderAsset("src/main/webapp/WEB-INF/beans.xml", Main.class.getClassLoader()), "beans.xml");


    swarm.start().deploy(deployment);

}
 
开发者ID:xstefank,项目名称:lra-service,代码行数:22,代码来源:Main.java

示例2: createDeployment

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
protected static JAXRSArchive createDeployment(Swarm container) throws Exception {
    System.out.println("\tConfiguration folder is " + configFolder);
    
    LoginModule<?> loginModule = new LoginModule<>("UsersRoles");
    loginModule.flag(Flag.REQUIRED)
    .code("UsersRoles")
    .moduleOption("usersProperties", configFolder + "/security/application-users.properties")
    .moduleOption("rolesProperties", configFolder + "/security/application-roles.properties");
    
    SecurityDomain<?> security = new SecurityDomain<>("other")
            .classicAuthentication(new ClassicAuthentication<>()
                    .loginModule(loginModule)); 
    container.fraction(new SecurityFraction().securityDomain(security));

    JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "kie-server.war");
    deployment.staticContent();
    deployment.addAllDependencies();
    deployment.addAsWebInfResource(new File(configFolder + "/web/web.xml"), "web.xml");
    deployment.addAsWebInfResource(new File(configFolder + "/web/jboss-web.xml"), "jboss-web.xml");
    
            
    return deployment;
    
}
 
开发者ID:jesuino,项目名称:kie-ml,代码行数:25,代码来源:AbstractKieServerMain.java

示例3: createDeployment

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.addPackage("pro.taskana");
    deployment.addClass(TaskanaProducers.class);
    deployment.addAllDependencies();
    deployment.addDependency("org.mybatis:mybatis:3.4.2");
    deployment.addDependency("org.mybatis:mybatis-cdi:1.0.0");
    deployment.addDependency("pro.taskana:taskana-core:0.0.5-SNAPSHOT");
    deployment.addAsResource("META-INF/beans.xml");
    deployment.addAsResource("taskana.properties");
    deployment.addAsResource("project-defaults.yml");
    return deployment;
}
 
开发者ID:Taskana,项目名称:taskana,代码行数:15,代码来源:TaskanaProducersTest.java

示例4: getDeployment

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
@Deployment
public static Archive<?> getDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class);
    war.addPackage(EntityToModelMapper.class.getPackage());
    war.addClasses(GaeSearchRepository.class, SearchData.class, SearchConfiguration.class);
    war.addAsWebInfResource("appengine-web.xml");
    war.addAsResource("datastore-indexes.xml");

    PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
    war.addAsLibraries(pom.resolve("com.google.appengine:appengine-api-1.0-sdk").withTransitivity().as(File.class));
    war.addAsLibraries(pom.resolve("me.snowdrop.data:spring-data-snowdrop-core").withTransitivity().as(File.class));

    return war;
}
 
开发者ID:snowdrop,项目名称:spring-data-snowdrop,代码行数:15,代码来源:SearchTest.java

示例5: main

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Swarm swarm = new Swarm();
  WARArchive deployment = ShrinkWrap.create(WARArchive.class);
  deployment.
      addAllDependencies().
      addClass(JaxRsActivator.class).
      addAsServiceProvider(Extension.class, K8SExtension.class).
      addPackages(true,"ch.trivadis.workshop");
  deployment.staticContent();
  swarm.start();
  swarm.deploy(deployment);
}
 
开发者ID:amoAHCP,项目名称:openshift-workshop,代码行数:13,代码来源:MainApp.java

示例6: createDeployment

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
    return ShrinkWrap.create(WebArchive.class);
}
 
开发者ID:eclipse,项目名称:microprofile-open-api,代码行数:5,代码来源:OASFactoryErrorTest.java

示例7: WebArchiveBuilder

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
public WebArchiveBuilder() {
    this(ShrinkWrap.create(WebArchive.class));
}
 
开发者ID:mvc-spec,项目名称:mvc-tck,代码行数:4,代码来源:WebArchiveBuilder.java

示例8: createDeployment

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(WebArchive.class, ProvidesRestClientBuilderTest.class.getSimpleName()+".war");
}
 
开发者ID:eclipse,项目名称:microprofile-rest-client,代码行数:5,代码来源:ProvidesRestClientBuilderTest.java

示例9: createDeployment

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
@Deployment
public static Archive<?> createDeployment() {
    return ShrinkWrap.create(WebArchive.class, InvalidInterfaceTest.class.getSimpleName()+".war");
}
 
开发者ID:eclipse,项目名称:microprofile-rest-client,代码行数:5,代码来源:InvalidInterfaceTest.java

示例10: deploy

import org.jboss.shrinkwrap.api.ShrinkWrap; //导入方法依赖的package包/类
@Deployment
public static Archive deploy(){
    return ShrinkWrap.create(WebArchive.class);
}
 
开发者ID:arquillian,项目名称:arquillian-reporter,代码行数:5,代码来源:SimpleTest.java


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