Search in sources :

Example 6 with WARArchive

use of org.wildfly.swarm.undertow.WARArchive in project wildfly-swarm by wildfly-swarm.

the class TopologyWebAppDeploymentProducer method deployment.

@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;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ClassLoaderAsset(org.jboss.shrinkwrap.api.asset.ClassLoaderAsset) WARArchive(org.wildfly.swarm.undertow.WARArchive) Produces(javax.enterprise.inject.Produces) Dependent(javax.enterprise.context.Dependent)

Example 7 with WARArchive

use of org.wildfly.swarm.undertow.WARArchive in project wildfly-swarm by wildfly-swarm.

the class StaticContentContextRootDeploymentTest method getSecond.

@Deployment(testable = false)
public static Archive getSecond() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.setContextRoot("/static");
    deployment.staticContent();
    return deployment;
}
Also used : WARArchive(org.wildfly.swarm.undertow.WARArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 8 with WARArchive

use of org.wildfly.swarm.undertow.WARArchive in project wildfly-swarm by wildfly-swarm.

the class StaticContentDeploymentTest method getFirst.

@Deployment(testable = false)
public static Archive getFirst() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.staticContent();
    return deployment;
}
Also used : WARArchive(org.wildfly.swarm.undertow.WARArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 9 with WARArchive

use of org.wildfly.swarm.undertow.WARArchive in project wildfly-swarm by wildfly-swarm.

the class StaticContentPathDeploymentTest method getThird.

@Deployment(testable = false)
public static Archive getThird() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.staticContent("foo");
    return deployment;
}
Also used : WARArchive(org.wildfly.swarm.undertow.WARArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 10 with WARArchive

use of org.wildfly.swarm.undertow.WARArchive in project wildfly-swarm by wildfly-swarm.

the class StaticContentWarTest method createDeployment.

@Deployment
public static Archive createDeployment() throws Exception {
    WARArchive deployment = ShrinkWrap.create(WARArchive.class);
    deployment.staticContent();
    return deployment;
}
Also used : WARArchive(org.wildfly.swarm.undertow.WARArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

WARArchive (org.wildfly.swarm.undertow.WARArchive)39 Deployment (org.jboss.arquillian.container.test.api.Deployment)15 Test (org.junit.Test)8 WebXmlAsset (org.wildfly.swarm.undertow.descriptors.WebXmlAsset)5 Produces (javax.enterprise.inject.Produces)4 Node (org.jboss.shrinkwrap.api.Node)4 URL (java.net.URL)3 ClassLoaderAsset (org.jboss.shrinkwrap.api.asset.ClassLoaderAsset)3 MockTracer (io.opentracing.mock.MockTracer)2 BufferedReader (java.io.BufferedReader)2 File (java.io.File)2 InputStreamReader (java.io.InputStreamReader)2 List (java.util.List)2 Map (java.util.Map)2 Module (org.jboss.modules.Module)2 ArchivePath (org.jboss.shrinkwrap.api.ArchivePath)2 Asset (org.jboss.shrinkwrap.api.asset.Asset)2 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)2 JBossWebAsset (org.wildfly.swarm.undertow.descriptors.JBossWebAsset)2 UndertowExternalMountsAsset (org.wildfly.swarm.undertow.internal.UndertowExternalMountsAsset)2