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


Java WARArchive.addModule方法代码示例

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


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

示例3: 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

示例4: odataWar

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
@Produces
public Archive odataWar() throws Exception {
    // TODO: Keycloak Integration for security (see Jolokia project)
    WARArchive war = ShrinkWrap.create(WARArchive.class, "odata.war")
            .setContextRoot(this.fraction.getContext())
            .setWebXML(this.getClass().getResource("/web.xml"));
    war.addModule("org.jboss.teiid.olingo");
    return war;
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:10,代码来源:ODataWarDeploymentProducer.java

示例5: archiveFromCurrentApp

import org.wildfly.swarm.undertow.WARArchive; //导入方法依赖的package包/类
public static WARArchive archiveFromCurrentApp() throws Exception {
    final WARArchive archive = ShrinkWrap.create(WARArchive.class, determineName());
    final DefaultDeploymentFactory factory = new DefaultWarDeploymentFactory();
    factory.setup(archive);
    archive.addModule("org.wildfly.swarm.undertow", "runtime");

    return archive;
}
 
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:9,代码来源:DefaultWarDeploymentFactory.java


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