Пример проекта здесь .
Openliberty 20.0.0.1 AdaptOpenJDK 8
Конфигурация для профиля, управляемого Arquillian Liberty.
<profile>
<!-- Run with: mvn clean test -Parq-liberty-managed -->
<id>arq-liberty-managed</id>
<properties>
<skipTests>false</skipTests>
</properties>
<dependencies>
<dependency>
<groupId>io.openliberty.arquillian</groupId>
<artifactId>arquillian-liberty-managed</artifactId>
<version>${arquillian-liberty.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<id>unpack</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>io.openliberty</groupId>
<artifactId>openliberty-runtime</artifactId>
<version>${liberty.runtime.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<configuration>
<!--<environmentVariables>
<WLP_HOME>${project.build.directory}/wlp</WLP_HOME>
</environmentVariables>-->
<systemProperties>
<arquillian.launch>liberty-managed</arquillian.launch>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
И arquillian. xml содержимое файла:
<container qualifier="liberty-managed">
<configuration>
<property name="wlpHome">target/wlp/</property>
<property name="serverName">defaultServer</property>
<property name="httpPort">9080</property>
<property name="serverStartTimeout">300</property>
</configuration>
</container>
При запуске теста с помощью следующей команды:
mvn clean verify -Parq-liberty-managed
И получил информацию от приставка. Журнал сборки Github Actions можно найти здесь .
087 seconds.
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 311.064 s <<< FAILURE! - in com.example.it.GreetingResourceTest
[ERROR] com.example.it.GreetingResourceTest Time elapsed: 311.05 s <<< ERROR!
org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
Caused by: org.jboss.arquillian.container.spi.client.container.LifecycleException: Unable to retrieve connector address for localConnector of started VM
[INFO] Running com.example.it.GreetingServiceTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.03 s <<< FAILURE! - in com.example.it.GreetingServiceTest
[ERROR] com.example.it.GreetingServiceTest Time elapsed: 0.018 s <<< ERROR!
java.lang.RuntimeException: Arquillian initialization has already been attempted, but failed. See previous exceptions for cause
Caused by: org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
Caused by: org.jboss.arquillian.container.spi.client.container.LifecycleException: Unable to retrieve connector address for localConnector of started VM
[AUDIT ] CWWKE0055I: Server shutdown requested on Friday, February 7, 2020 at 4:44 PM. The server defaultServer is shutting down.
[AUDIT ] CWWKE1100I: Waiting for up to 30 seconds for the server to quiesce.
[INFO ] CWWKE1101I: Server quiesce complete.
[AUDIT ] CWWKE0036I: The server defaultServer stopped after 5 minutes, 12.017 seconds.
Picked up JAVA_TOOL_OPTIONS: -Dcom.ibm.ws.logging.console.log.level=INFO
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0