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


Java WARArchive.addClass方法代码示例

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


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

示例1: getImplicitDeployments

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Override
public List<Archive> getImplicitDeployments(TopologyWebAppFraction fraction) throws Exception {
    String context = System.getProperty(TopologyProperties.CONTEXT_PATH);
    if (context == null) context = DEFAULT_CONTEXT;

    List<Archive> list = new ArrayList<>();
    if (fraction.exposeTopologyEndpoint()) {
        WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
        war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
        war.addClass(TopologySSEServlet.class);
        war.addModule("swarm.application");
        war.addModule("org.wildfly.swarm.topology");
        war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
        war.setContextRoot(context);
        war.as(TopologyArchive.class);
        list.add(war);
    }
    return list;
}
 
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology,代码行数:20,代码来源:TopologyWebAppConfiguration.java

示例2: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);

    // on real world deployments, these parts would come from a dependency of the target application
    deployment.addClass(MockTracerResolver.class);
    deployment.addPackage(MockTracer.class.getPackage());
    deployment.addAsServiceProvider(TracerResolver.class, MockTracerResolver.class);

    // this is a simple servlet, that we can hit with our tests
    deployment.addClass(SimpleServlet.class);
    deployment.addClass(HealthServlet.class);
    deployment.addAsResource("project-skip-pattern.yml");

    return deployment;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:17,代码来源:SkipPatternTest.java

示例3: deployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Produces
@Dependent()
Archive deployment() {

    String context = TopologyWebAppFraction.DEFAULT_CONTEXT;
    if (this.contextPath != null) {
        context = this.contextPath;
    }

    if (fraction.exposeTopologyEndpoint()) {
        WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
        war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
        war.addClass(TopologySSEServlet.class);
        war.addModule("swarm.application");
        war.addModule("org.wildfly.swarm.topology");
        war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
        war.setContextRoot(context);
        war.as(TopologyArchive.class);
        return war;
    }
    return null;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:23,代码来源:TopologyWebAppDeploymentProducer.java

示例4: getImplicitDeployments

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Override
public List<Archive> getImplicitDeployments(TopologyWebAppFraction fraction) throws Exception {
    String context = System.getProperty(TopologyProperties.CONTEXT_PATH);
    if (context == null) context = DEFAULT_CONTEXT;

    List<Archive> list = new ArrayList<>();
    WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
    war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
    war.addClass(TopologySSEServlet.class);
    war.addModule("swarm.application");
    war.addModule("org.wildfly.swarm.topology");
    war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
    war.setContextRoot(context);
    war.as(TopologyArchive.class);
    list.add(war);
    return list;
}
 
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:18,代码来源:TopologyWebAppConfiguration.java

示例5: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的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

示例6: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);

    // on real world deployments, these parts would come from a dependency of the target application
    deployment.addClass(MockTracerResolver.class);
    deployment.addPackage(MockTracer.class.getPackage());
    deployment.addAsServiceProvider(TracerResolver.class, MockTracerResolver.class);

    // this is a simple servlet, that we can hit with our tests
    deployment.addClass(SimpleServlet.class);

    return deployment;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:15,代码来源:TraceResolverOnDeploymentTest.java

示例7: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class, "services.war");
    deployment.addAsLibraries(Maven.resolver().resolve("saxon:saxon:8.7").withTransitivity().asFile());
    deployment.addClass(ServicesServlet.class);
    deployment.addClass(TransformerServlet.class);
    return deployment;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:9,代码来源:JAXPOverrideTest.java

示例8: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment
public static Archive createDeployment() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class, "services.war");
    deployment.addClass(ServicesServlet.class);
    deployment.addClass(TransformerServlet.class);
    return deployment;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:8,代码来源:ArquillianTest.java

示例9: createDeployment

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Deployment(testable = false)
public static Archive createDeployment() {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.addClass(TestServlet.class);
    return deployment;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:RibbonSecuredArquillianTest.java

示例10: testDetectJAXRSness_isNot

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testDetectJAXRSness_isNot() {
    WARArchive archive = ShrinkWrap.create( WARArchive.class );
    archive.addClass( MyRandomClass.class );
    assertThat( JAXRSArchive.isJAXRS( archive )).isFalse();
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:JAXRSArchiveTest.java

示例11: testDetectJAXRSness_classAnnotation

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testDetectJAXRSness_classAnnotation() {
    WARArchive archive = ShrinkWrap.create( WARArchive.class );
    archive.addClass( MyResource.class );
    assertThat( JAXRSArchive.isJAXRS( archive )).isTrue();
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:JAXRSArchiveTest.java

示例12: testDetectJAXRSness_methodAnnotation

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Test
public void testDetectJAXRSness_methodAnnotation() {
    WARArchive archive = ShrinkWrap.create( WARArchive.class );
    archive.addClass( MyOtherResource.class );
    assertThat( JAXRSArchive.isJAXRS( archive )).isTrue();
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:7,代码来源:JAXRSArchiveTest.java


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