Skip to content

Commit

Permalink
Setup liberty profile with latest settings
Browse files Browse the repository at this point in the history
This commit contains the download and configuration logic for
OpenLiberty on a managed Arquillian adapter. It provides the possibility
to declare the version to download but needs an additional
`liberty:create` command to download and configure the server.

fixes: #295
  • Loading branch information
erdlet committed Jul 29, 2022
1 parent 1c0c44a commit 30d88c4
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 11 deletions.
10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<htmlunit.version>2.63.0</htmlunit.version>
<arquillian-glassfish-remote-3.1.version>1.0.0.Final</arquillian-glassfish-remote-3.1.version>
<wildfly-arquillian-container.version>5.0.0.Alpha3</wildfly-arquillian-container.version>
<arquillian-liberty-managed-jakarta.version>2.0.0-M1</arquillian-liberty-managed-jakarta.version>
<arquillian-liberty-managed-jakarta.version>2.0.2</arquillian-liberty-managed-jakarta.version>

<!-- PLUGIN PROPERTIES -->
<dependencyCheckSkip>true</dependencyCheckSkip>
Expand Down Expand Up @@ -502,6 +502,14 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.openliberty.arquillian</groupId>
<artifactId>arquillian-liberty-managed-jakarta-junit</artifactId>
<version>${arquillian-liberty-managed-jakarta.version}</version>
<type>pom</type>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.openliberty.arquillian</groupId>
<artifactId>arquillian-liberty-managed-jakarta</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tck/src/test/resources/liberty/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>

<!-- Default SSL configuration enables trust for default certificates from the Java runtime -->
<!-- Default SSL configuration enables trust for default certificates from the Java runtime -->
<ssl id="defaultSSLConfig" trustDefaultCerts="true" />
</server>
37 changes: 29 additions & 8 deletions testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@
<type>pom</type>
</dependency>

<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<version>${shrinkwrap-resolver-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- Define optional dependencies for the tests below -->
<!-- EXT -->
<dependency>
Expand Down Expand Up @@ -422,13 +414,42 @@

<build>
<plugins>
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.3.4</version>
<configuration>
<skip>${skipTests}</skip>
<serverName>defaultServer</serverName>
<assemblyArtifact>
<groupId>io.openliberty</groupId>
<artifactId>openliberty-jakartaee9</artifactId>
<version>22.0.0.7</version>
<type>zip</type>
</assemblyArtifact>
</configuration>
<executions>
<execution>
<id>create-server</id>
<phase>pre-integration-test</phase>
<configuration>
<serverName>defaultServer</serverName>
<serverXmlFile>src/test/resources/liberty/server.xml</serverXmlFile>
</configuration>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipITs>false</skipITs>
<systemProperties>
<arquillian.launch>liberty</arquillian.launch>
<testsuite.profile>testsuite-liberty</testsuite.profile>
<liberty.home>${project.build.directory}/liberty/wlp</liberty.home>
</systemProperties>
</configuration>
</plugin>
Expand Down
4 changes: 3 additions & 1 deletion testsuite/src/test/resources/arquillian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
<container qualifier="liberty">
<configuration>
<property name="wlpHome">${liberty.home}</property>
<property name="serverName">defaultServer</property>
<property name="httpPort">9080</property>
<!-- Uncomment for local debugging -->
<!-- <property name="javaVmArguments">-Xrunjdwp:transport=dt_socket,address=7777,server=y,suspend=y</property> -->
<property name="javaVmArguments">--add-opens=java.base/java.lang=ALL-UNNAMED</property>
</configuration>
</container>
</arquillian>
19 changes: 19 additions & 0 deletions testsuite/src/test/resources/liberty/server.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">

<!-- Enable features -->
<featureManager>
<feature>jakartaee-9.1</feature>
<feature>localConnector-1.0</feature>
</featureManager>

<!-- To access this server from a remote client add a host attribute
to the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443"
id="defaultHttpEndpoint" />

<applicationMonitor updateTrigger="mbean" />

<!-- Default SSL configuration enables trust for default certificates from the Java runtime -->
<ssl id="defaultSSLConfig" trustDefaultCerts="true" />
</server>

0 comments on commit 30d88c4

Please sign in to comment.