Skip to content

Commit 170c9e0

Browse files
committed
Added profile for "managed-embedded" Liberty server
1 parent 8b10dcd commit 170c9e0

3 files changed

Lines changed: 125 additions & 0 deletions

File tree

‎pom.xml‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<maven.test.skip>false</maven.test.skip>
4141
<hamcrest.version>1.3</hamcrest.version>
4242
<glassfish.version>4.1.1</glassfish.version>
43+
<liberty.version>16.0.0.2</liberty.version>
4344

4445
<!--
4546
TomEE version that's installed and used when selecting the
@@ -885,6 +886,87 @@
885886
</build>
886887
</profile>
887888

889+
890+
<profile>
891+
<id>liberty-embedded-arquillian</id>
892+
893+
<dependencies>
894+
<dependency>
895+
<groupId>org.jboss.arquillian.container</groupId>
896+
<artifactId>arquillian-wlp-managed-8.5</artifactId>
897+
<version>1.0.0.Beta2</version>
898+
<scope>test</scope>
899+
</dependency>
900+
</dependencies>
901+
902+
<build>
903+
<plugins>
904+
<plugin>
905+
<groupId>org.apache.maven.plugins</groupId>
906+
<artifactId>maven-dependency-plugin</artifactId>
907+
<executions>
908+
<execution>
909+
<id>unpack</id>
910+
<phase>process-test-classes</phase>
911+
<goals>
912+
<goal>unpack</goal>
913+
</goals>
914+
<configuration>
915+
<artifactItems>
916+
<artifactItem>
917+
<groupId>com.ibm.websphere.appserver.runtime</groupId>
918+
<artifactId>wlp-javaee7</artifactId>
919+
<version>${liberty.version}</version>
920+
<type>zip</type>
921+
<overWrite>false</overWrite>
922+
<outputDirectory>${project.build.directory}</outputDirectory>
923+
</artifactItem>
924+
</artifactItems>
925+
</configuration>
926+
</execution>
927+
</executions>
928+
</plugin>
929+
<plugin>
930+
<groupId>org.apache.maven.plugins</groupId>
931+
<artifactId>maven-antrun-plugin</artifactId>
932+
<version>1.1</version>
933+
<executions>
934+
<execution>
935+
<phase>process-test-classes</phase>
936+
<goals>
937+
<goal>run</goal>
938+
</goals>
939+
<configuration>
940+
<tasks>
941+
<!-- TODO: There has to be a better way. Look at
942+
PR for Liberty arquillian container to modify server.xml?
943+
-->
944+
<echo>Copying server.xml</echo>
945+
<copy
946+
failonerror="false"
947+
file="../../test-utils/src/main/resources/server.xml"
948+
tofile="${project.build.directory}/wlp/templates/servers/defaultServer/server.xml"
949+
/>
950+
</tasks>
951+
</configuration>
952+
</execution>
953+
</executions>
954+
</plugin>
955+
<plugin>
956+
<groupId>org.apache.maven.plugins</groupId>
957+
<artifactId>maven-surefire-plugin</artifactId>
958+
<configuration>
959+
<systemPropertyVariables>
960+
<arquillian.launch>liberty-embedded-arquillian</arquillian.launch>
961+
<arquillian.liberty.wlpHome>${project.build.directory}/wlp</arquillian.liberty.wlpHome>
962+
</systemPropertyVariables>
963+
</configuration>
964+
</plugin>
965+
</plugins>
966+
</build>
967+
</profile>
968+
969+
888970
<profile>
889971
<id>weblogic-remote-arquillian</id>
890972

‎test-utils/src/main/resources/arquillian.xml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
<property name="wlpHome">${libertyManagedArquillian_wlpHome}</property>
2323
</configuration>
2424
</container>
25+
26+
<container qualifier="liberty-embedded-arquillian">
27+
<configuration>
28+
<property name="deployType">xml</property>
29+
<property name="wlpHome">${arquillian.liberty.wlpHome}</property>
30+
</configuration>
31+
</container>
2532

2633
<container qualifier="weblogic-remote-arquillian">
2734
<configuration>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<server description="new server">
3+
4+
<!-- Enable features -->
5+
<featureManager>
6+
<feature>javaee-7.0</feature>
7+
<feature>localConnector-1.0</feature>
8+
</featureManager>
9+
10+
<!-- This template enables security. To get the full use of all the capabilities, a keystore and user registry are required. -->
11+
12+
<!-- For the keystore, default keys are generated and stored in a keystore. To provide the keystore password, generate an
13+
encoded password using bin/securityUtility encode and add it below in the password attribute of the keyStore element.
14+
Then uncomment the keyStore element. -->
15+
<!--
16+
<keyStore password=""/>
17+
-->
18+
19+
<!--For a user registry configuration, configure your user registry. For example, configure a basic user registry using the
20+
basicRegistry element. Specify your own user name below in the name attribute of the user element. For the password,
21+
generate an encoded password using bin/securityUtility encode and add it in the password attribute of the user element.
22+
Then uncomment the user element. -->
23+
<!--
24+
<basicRegistry id="basic" realm="BasicRealm">
25+
<user name="yourUserName" password="" />
26+
</basicRegistry>
27+
-->
28+
29+
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
30+
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
31+
32+
<!-- Automatically expand WAR files and EAR files -->
33+
<applicationManager autoExpand="true"/>
34+
35+
36+
</server>

0 commit comments

Comments
 (0)