Skip to content

Commit

Permalink
Fixes piranhacloud#3682 - Add Java 22 to build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Mar 23, 2024
1 parent 0448585 commit 8a27ed8
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 36 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [ 21, 22 ]
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Setup Java 21
- name: Setup Java
uses: actions/setup-java@v3
with:
cache: 'maven'
distribution: 'temurin'
java-version: 21
java-version: $${{ matrix.java }}
- name: Build with Maven
run: mvn --no-transfer-progress -B install
- name: Publish Unit Test Results
Expand Down
91 changes: 65 additions & 26 deletions http/virtual/pom.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>cloud.piranha.http</groupId>
<artifactId>project</artifactId>
<version>24.4.0-SNAPSHOT</version>
</parent>

<artifactId>piranha-http-virtual</artifactId>
<name>Piranha - HTTP - Virtual Threads implementation</name>

<dependencies>
<dependency>
<groupId>cloud.piranha.http</groupId>
Expand All @@ -26,30 +24,8 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<enablePreview>true</enablePreview>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<configuration>
<additionalOptions>--enable-preview</additionalOptions>
<release>${java.version}</release>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand All @@ -59,5 +35,68 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>jdk21</id>
<activation>
<jdk>21</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<enablePreview>true</enablePreview>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<configuration>
<additionalOptions>--enable-preview</additionalOptions>
<release>${java.version}</release>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk22</id>
<activation>
<jdk>22</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>22</release>
<enablePreview>true</enablePreview>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<configuration>
<additionalOptions>--enable-preview</additionalOptions>
<release>22</release>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
47 changes: 39 additions & 8 deletions test/embedded/springboot-virtualthreads/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<enablePreview>true</enablePreview>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand All @@ -68,4 +60,43 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk21</id>
<activation>
<jdk>21</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<enablePreview>true</enablePreview>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk22</id>
<activation>
<jdk>22</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>22</release>
<enablePreview>true</enablePreview>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit 8a27ed8

Please sign in to comment.