Skip to content

Commit

Permalink
build: introduce Payara Arquillian Managed profile ocpsoft#345
Browse files Browse the repository at this point in the history
- Add Jakarta EE9 and EE10 compatible Payara versions
- Add configuration to run Arquillian integration tests in a managed instance of Payara
- Add JUnit category to skip tests that should be ignored on Payara
  • Loading branch information
poikilotherm committed Oct 18, 2022
1 parent 620a6ba commit c59459c
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 0 deletions.
91 changes: 91 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<version.arquillian.drone>2.5.5</version.arquillian.drone>
<version.arquillian.container.managed.wildfly>3.0.1.Final</version.arquillian.container.managed.wildfly>
<version.arquillian.container.remote.wildfly>3.0.1.Final</version.arquillian.container.remote.wildfly>
<version.arquillian.container.managed.payara>2.4.6</version.arquillian.container.managed.payara>

<version.payara>5.2022.3</version.payara>
<payara.home>${project.build.directory}/payara5</payara.home>

<version.wildfly>26.1.1.Final</version.wildfly>

Expand Down Expand Up @@ -442,9 +446,15 @@
<id>EE10</id>
<properties>
<version.jakarta>10.0.0</version.jakarta>

<version.wildfly>27.0.0.Beta1</version.wildfly>

<version.payara>6.2022.1.Alpha4</version.payara>
<payara.home>${project.build.directory}/payara6</payara.home>

<version.arquillian.container.managed.wildfly>5.0.0.Alpha5</version.arquillian.container.managed.wildfly>
<version.arquillian.container.remote.wildfly>5.0.0.Alpha5</version.arquillian.container.remote.wildfly>
<version.arquillian.container.managed.payara>3.0.alpha6</version.arquillian.container.managed.payara>
</properties>
</profile>

Expand Down Expand Up @@ -575,6 +585,87 @@
</plugins>
</build>
</profile>


<!-- PAYARA -->
<profile>
<id>PAYARA_MANAGED</id>
<properties>
<skipTests>false</skipTests>
</properties>
<dependencies>

<!-- Required since arquillian-payara 2.4 -->
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>payara-client-ee9</artifactId>
<version>${version.arquillian.container.managed.payara}</version>
</dependency>

<!-- Payara Server Container adaptor -->
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>arquillian-payara-server-managed</artifactId>
<version>${version.arquillian.container.managed.payara}</version>
<scope>test</scope>
</dependency>

<!-- Env Sync -->
<dependency>
<groupId>fish.payara.arquillian</groupId>
<artifactId>environment-setup</artifactId>
<version>${version.arquillian.container.managed.payara}</version>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${version.dependency.plugin}</version>
<executions>
<execution>
<id>unpack</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>fish.payara.distributions</groupId>
<artifactId>payara</artifactId>
<version>${version.payara}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<configuration>
<excludedGroups>
org.ocpsoft.rewrite.category.IgnoreForPayara
</excludedGroups>
<argLine>--illegal-access=debug --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
<systemPropertyVariables>
<payara.home>${payara.home}</payara.home>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>


</profiles>

<developers>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.ocpsoft.rewrite.category;

/**
* JUnit category which will prevent a certain test to be executed when running the test suite with Payara.
*/
public interface IgnoreForPayara {
}

0 comments on commit c59459c

Please sign in to comment.