當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。