Search in sources :

Example 1 with JAXRSArchive

use of org.wildfly.swarm.jaxrs.JAXRSArchive in project narayana by jbosstm.

the class LRASmokeIT method createDeployment.

@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
    JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "lra-smoke-it.war");
    deployment.addPackages(true, "io.narayana.lra.coordinator");
    File[] libs = Maven.resolver().loadPomFromFile("pom.xml").resolve("org.jboss.narayana.rts:lra-filters").withTransitivity().as(File.class);
    deployment.addAsLibraries(libs);
    return deployment;
}
Also used : JAXRSArchive(org.wildfly.swarm.jaxrs.JAXRSArchive) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 2 with JAXRSArchive

use of org.wildfly.swarm.jaxrs.JAXRSArchive in project narayana by jbosstm.

the class SpecIT method createDeployment.

@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
    JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "lra-smoke-it.war");
    deployment.addPackages(true, "io/narayana/lra/participant");
    File[] libs = Maven.resolver().loadPomFromFile("pom.xml").resolve("org.jboss.narayana.rts:lra-filters").withTransitivity().as(File.class);
    deployment.addAsLibraries(libs);
    return deployment;
}
Also used : JAXRSArchive(org.wildfly.swarm.jaxrs.JAXRSArchive) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 3 with JAXRSArchive

use of org.wildfly.swarm.jaxrs.JAXRSArchive in project wildfly-swarm by wildfly-swarm.

the class AdvertiseAndTagByAnnotationTest method createDeployment.

@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
    JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class);
    deployment.addClass(TaggedAdvertiser.class);
    deployment.addClass(UntaggedAdvertiser.class);
    deployment.addAllDependencies();
    return deployment;
}
Also used : JAXRSArchive(org.wildfly.swarm.jaxrs.JAXRSArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 4 with JAXRSArchive

use of org.wildfly.swarm.jaxrs.JAXRSArchive in project wildfly-swarm by wildfly-swarm.

the class AdvertiseAndTagByMainTest method createDeployment.

@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
    JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class);
    deployment.add(EmptyAsset.INSTANCE, "nothing");
    deployment.as(TopologyArchive.class).advertise(serviceName, asList(tag1, tag2));
    deployment.addAllDependencies();
    return deployment;
}
Also used : JAXRSArchive(org.wildfly.swarm.jaxrs.JAXRSArchive) TopologyArchive(org.wildfly.swarm.topology.TopologyArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 5 with JAXRSArchive

use of org.wildfly.swarm.jaxrs.JAXRSArchive in project wildfly-swarm by wildfly-swarm.

the class WebXMLAdapter method process.

@Override
public void process() {
    if (archive.getName().endsWith(".war")) {
        JAXRSArchive jaxrsArchive = archive.as(JAXRSArchive.class);
        jaxrsArchive.findWebXmlAsset().setContextParam("resteasy.providers", SERVER_SIDE_FILTERS);
    }
}
Also used : JAXRSArchive(org.wildfly.swarm.jaxrs.JAXRSArchive)

Aggregations

JAXRSArchive (org.wildfly.swarm.jaxrs.JAXRSArchive)21 Test (org.junit.Test)12 AnnotationNode (org.objectweb.asm.tree.AnnotationNode)7 ClassNode (org.objectweb.asm.tree.ClassNode)7 File (java.io.File)6 Node (org.jboss.shrinkwrap.api.Node)6 Deployment (org.jboss.arquillian.container.test.api.Deployment)5 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)4 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)3 SwaggerArchive (org.wildfly.swarm.swagger.SwaggerArchive)3 Files (java.nio.file.Files)2 TemporalField (java.time.temporal.TemporalField)2 Assertions.assertThat (org.fest.assertions.Assertions.assertThat)2 ShrinkWrap (org.jboss.shrinkwrap.api.ShrinkWrap)2 ByteArrayAsset (org.jboss.shrinkwrap.api.asset.ByteArrayAsset)2 EmptyAsset (org.jboss.shrinkwrap.api.asset.EmptyAsset)2 ExplodedExporter (org.jboss.shrinkwrap.api.exporter.ExplodedExporter)2 ZipExporter (org.jboss.shrinkwrap.api.exporter.ZipExporter)2 After (org.junit.After)2 TempFileManager (org.wildfly.swarm.bootstrap.util.TempFileManager)2