Skip to content

Commit 4926880

Browse files
committed
add a profile for WildFly Swarm
1 parent d6271c5 commit 4926880

3 files changed

Lines changed: 103 additions & 3 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A brief instruction how to clone, build, import and run the samples on your loca
1313

1414
Only one container profile can be active at a given time otherwise there will be dependency conflicts.
1515

16-
There are 14 available container profiles, for 6 different servers:
16+
There are 16 available container profiles, for 6 different servers:
1717

1818
* Payara and GlassFish
1919
* ``payara-ci-managed``
@@ -77,6 +77,13 @@ There are 14 available container profiles, for 6 different servers:
7777
reuse this instance to run the tests.
7878
Useful for development to avoid the server start up cost per sample.
7979

80+
* ``wildfly-swarm``
81+
82+
This profile uses WildFly Swarm, which allows building uberjars that contain just enough of the WildFly
83+
application server. Here, the parts of WildFly that are included are selected based on inspecting the application
84+
and looking for the Java EE APIs that are actually used. The WildFly Swarm version that's used can be set via
85+
the ``wildfly.swarm.version`` property.
86+
8087
* TomEE
8188

8289
* ``tomee-ci-managed``

pom.xml

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<glassfish.version>4.1.1</glassfish.version>
3131
<liberty.version>16.0.0.3</liberty.version>
3232
<wildfly.version>10.1.0.Final</wildfly.version>
33+
<wildfly.swarm.version>2017.4.0</wildfly.swarm.version>
3334
<tomee.version>7.0.1</tomee.version>
3435
<tomcat.version>8.5.6</tomcat.version>
3536
</properties>
@@ -903,8 +904,82 @@
903904
</build>
904905
</profile>
905906

906-
907-
907+
<profile>
908+
<id>wildfly-swarm</id>
909+
910+
<dependencies>
911+
<!-- Needed for websocket tests that use ContainerProvider.getWebSocketContainer()
912+
to connect from a the client to the websocket server.
913+
-->
914+
<dependency>
915+
<groupId>io.undertow</groupId>
916+
<artifactId>undertow-websockets-jsr</artifactId>
917+
<version>1.4.0.Final</version>
918+
<scope>test</scope>
919+
</dependency>
920+
921+
<!-- Needed for jaxrs tests that use ClientBuilder to connect from a client
922+
to the JAX-RS server.
923+
-->
924+
<dependency>
925+
<groupId>org.jboss.resteasy</groupId>
926+
<artifactId>resteasy-client</artifactId>
927+
<version>3.0.19.Final</version>
928+
<scope>test</scope>
929+
</dependency>
930+
931+
<!-- Without this exception will be thrown about missing tracef method -->
932+
<dependency>
933+
<groupId>org.jboss.logging</groupId>
934+
<artifactId>jboss-logging</artifactId>
935+
<version>3.3.0.Final</version>
936+
<scope>test</scope>
937+
</dependency>
938+
<dependency>
939+
<groupId>org.jboss.resteasy</groupId>
940+
<artifactId>resteasy-jaxb-provider</artifactId>
941+
<version>3.0.19.Final</version>
942+
<scope>test</scope>
943+
</dependency>
944+
<dependency>
945+
<groupId>org.jboss.resteasy</groupId>
946+
<artifactId>resteasy-json-p-provider</artifactId>
947+
<version>3.0.19.Final</version>
948+
<scope>test</scope>
949+
</dependency>
950+
951+
<!-- The actual Arquillian container -->
952+
<dependency>
953+
<groupId>org.wildfly.swarm</groupId>
954+
<artifactId>arquillian</artifactId>
955+
<version>${wildfly.swarm.version}</version>
956+
<scope>test</scope>
957+
</dependency>
958+
</dependencies>
959+
<build>
960+
<testResources>
961+
<testResource>
962+
<directory>src/test/resources</directory>
963+
<filtering>true</filtering>
964+
</testResource>
965+
<testResource>
966+
<directory>src/test/resources-wildfly-swarm</directory>
967+
<filtering>true</filtering>
968+
</testResource>
969+
</testResources>
970+
<plugins>
971+
<plugin>
972+
<artifactId>maven-surefire-plugin</artifactId>
973+
<configuration>
974+
<systemPropertyVariables>
975+
<arquillian.xml>arquillian-swarm.xml</arquillian.xml>
976+
</systemPropertyVariables>
977+
</configuration>
978+
</plugin>
979+
</plugins>
980+
</build>
981+
</profile>
982+
908983

909984

910985
<!-- ### TOMEE ### -->
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian" xsi:schemaLocation="http://jboss.org/schema/arquillian
4+
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
5+
6+
<!--
7+
- must be in a separate file because in-container tests need to use Swarm's DaemonProtocol,
8+
- but arquillian.xml sets the default protocol to "Servlet 3.0" and there's no way to override that
9+
- (see https://issues.jboss.org/browse/ARQ-579)
10+
-->
11+
<container qualifier="wildfly-swarm" default="true">
12+
<configuration>
13+
<property name="host">localhost</property>
14+
<property name="port">${swarm.arquillian.daemon.port:12345}</property>
15+
</configuration>
16+
</container>
17+
18+
</arquillian>

0 commit comments

Comments
 (0)