Skip to content

Commit

Permalink
[#1799] JDK 21 support
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Sep 23, 2023
1 parent a9b1b6e commit 4f5cddf
Show file tree
Hide file tree
Showing 32 changed files with 314 additions and 128 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ name: "Blaze-Persistence CI"
on: [push, pull_request]
env:
MAVEN_SKIP_RC: true
# See https://github.com/hibernate/hibernate-orm/pull/4615 for a description of the behavior we're getting.
concurrency:
# Consider that two builds are in the same concurrency group (cannot run concurrently)
# if they use the same workflow and are about the same branch ("ref") or pull request.
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}"
# Cancel previous builds in the same concurrency group even if they are in process
# for pull requests or pushes to forks (not the upstream repository).
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'Blazebit/blaze-persistence' }}
jobs:
build:
name: Test
Expand All @@ -13,7 +21,7 @@ jobs:
matrix:
include:
################################################
# hibernate-5.2
# hibernate-5.6
################################################
- rdbms: h2
provider: hibernate-5.6
Expand Down Expand Up @@ -583,21 +591,21 @@ jobs:
################################################
- rdbms: h2
provider: hibernate-5.6
jdk: 20
jdk: 21
- rdbms: h2
provider: hibernate-5.6
jdk: 20
build-jdk: 20
jdk: 21
build-jdk: 21
################################################
# Early access JDKs
################################################
# - rdbms: h2
# provider: hibernate-5.6
# jdk: 21-ea
# jdk: 22-ea
# - rdbms: h2
# provider: hibernate-5.6
# jdk: 21-ea
# build-jdk: 21-ea
# jdk: 22-ea
# build-jdk: 22-ea
steps:
- uses: actions/checkout@v2
- name: Update /etc/hosts file
Expand All @@ -617,13 +625,13 @@ jobs:
targets: JDK8_HOME;JAVA_HOME
- name: Set up Requested JDK
uses: actions/setup-java@v3
if: ${{ matrix.jdk != 8 && !endsWith(matrix.jdk, '-ea') }}
if: ${{ matrix.jdk != 8 && !endsWith(matrix.jdk, '-ea') && matrix.jdk != '21' }}
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
- name: Set up EA JDK
uses: actions/setup-java@v3
if: ${{ matrix.jdk != 8 && endsWith(matrix.jdk, '-ea') }}
if: ${{ matrix.jdk != 8 && (endsWith(matrix.jdk, '-ea') || matrix.jdk == '21') }}
with:
java-version: ${{ matrix.jdk }}
distribution: 'zulu'
Expand Down
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [[ "$BUILD_JDK" != "" ]]; then
export BUILD_JDK=${BUILD_JDK::-3}
fi
PROPERTIES="$PROPERTIES -Dmain.java.version=$BUILD_JDK -Dtest.java.version=$BUILD_JDK -Djdk8.home=$JDK8_HOME"
if [[ "$BUILD_JDK" == "20" ]] || [[ "$BUILD_JDK" == "21" ]]; then
if [[ "$BUILD_JDK" == "21" ]] || [[ "$BUILD_JDK" == "22" ]]; then
# Until Deltaspike releases a version with ASM 9.5, we have to exclude these parts from the build
PROPERTIES="-pl !integration/deltaspike-data/testsuite $PROPERTIES"
# PROPERTIES="-pl !integration/deltaspike-data/testsuite,!examples/deltaspike-data-rest,!integration/quarkus/deployment,!integration/quarkus/runtime,!examples/quarkus/testsuite/base,!examples/quarkus/base $PROPERTIES"
Expand All @@ -48,6 +48,10 @@ if [[ "$JDK" != "" ]]; then
if [[ "$JDK" == *-ea ]]; then
export JDK=${JDK::-3}
fi
if [[ "$JDK" == "21" ]] || [[ "$JDK" == "22" ]]; then
# As of JDK 21 Javac produces parameter attributes with a null name that old BND versions can't read
PROPERTIES="$PROPERTIES -Dversion.bnd=7.0.0-SNAPSHOT"
fi
PROPERTIES="$PROPERTIES -Djdk8.home=$JDK8_HOME"
fi

Expand Down
14 changes: 10 additions & 4 deletions core/api-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<configuration>
<target>
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${com.blazebit:blaze-persistence-core-api:jar}" />
<arg value="${project.build.directory}/${project.build.finalName}.jar" />
Expand All @@ -87,7 +87,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-api:jar}" regexp="\.jar$" replace="-sources.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-sources.jar" />
Expand All @@ -114,7 +114,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-api:jar}" regexp="\.jar$" replace="-javadoc.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar" />
Expand Down Expand Up @@ -161,7 +161,7 @@
<dependency>
<groupId>org.eclipse.transformer</groupId>
<artifactId>org.eclipse.transformer.cli</artifactId>
<version>0.2.0</version>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
Expand All @@ -174,6 +174,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.transform</artifactId>
<version>${version.bnd}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>

Expand Down
14 changes: 10 additions & 4 deletions core/impl-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<configuration>
<target>
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${com.blazebit:blaze-persistence-core-impl:jar}" />
<arg value="${project.build.directory}/${project.build.finalName}.jar" />
Expand All @@ -99,7 +99,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-impl:jar}" regexp="\.jar$" replace="-sources.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-sources.jar" />
Expand All @@ -126,7 +126,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-impl:jar}" regexp="\.jar$" replace="-javadoc.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar" />
Expand Down Expand Up @@ -160,7 +160,7 @@
<dependency>
<groupId>org.eclipse.transformer</groupId>
<artifactId>org.eclipse.transformer.cli</artifactId>
<version>0.2.0</version>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
Expand All @@ -173,6 +173,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.transform</artifactId>
<version>${version.bnd}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>

Expand Down
14 changes: 10 additions & 4 deletions core/parser-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<configuration>
<target>
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${com.blazebit:blaze-persistence-core-parser:jar}" />
<arg value="${project.build.directory}/${project.build.finalName}.jar" />
Expand All @@ -91,7 +91,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-parser:jar}" regexp="\.jar$" replace="-sources.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-sources.jar" />
Expand All @@ -118,7 +118,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-parser:jar}" regexp="\.jar$" replace="-javadoc.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar" />
Expand Down Expand Up @@ -152,7 +152,7 @@
<dependency>
<groupId>org.eclipse.transformer</groupId>
<artifactId>org.eclipse.transformer.cli</artifactId>
<version>0.2.0</version>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
Expand All @@ -165,6 +165,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.transform</artifactId>
<version>${version.bnd}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>

Expand Down
16 changes: 11 additions & 5 deletions core/testsuite-jakarta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<configuration>
<target>
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${com.blazebit:blaze-persistence-core-testsuite:jar}" />
<arg value="${project.build.directory}/${project.build.finalName}.jar" />
Expand All @@ -113,7 +113,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-testsuite:jar}" regexp="\.jar$" replace="-sources.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-sources.jar" />
Expand All @@ -140,7 +140,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-testsuite:jar}" regexp="\.jar$" replace="-javadoc.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-javadoc.jar" />
Expand All @@ -167,7 +167,7 @@
<property name="plugin_classpath" refid="maven.plugin.classpath" />
<!--suppress UnresolvedMavenProperty -->
<ac:propertyregex xmlns:ac="antlib:net.sf.antcontrib" property="source" input="${com.blazebit:blaze-persistence-core-testsuite:jar}" regexp="\.jar$" replace="-tests.jar" global="true" />
<java classname="org.eclipse.transformer.jakarta.JakartaTransformer" fork="true">
<java classname="org.eclipse.transformer.cli.JakartaTransformerCLI" fork="true">
<!--suppress UnresolvedMavenProperty -->
<arg value="${source}" />
<arg value="${project.build.directory}/${project.build.finalName}-tests.jar" />
Expand All @@ -188,7 +188,7 @@
<dependency>
<groupId>org.eclipse.transformer</groupId>
<artifactId>org.eclipse.transformer.cli</artifactId>
<version>0.2.0</version>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>ant-contrib</groupId>
Expand All @@ -201,6 +201,12 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.transform</artifactId>
<version>${version.bnd}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>

Expand Down
Loading

0 comments on commit 4f5cddf

Please sign in to comment.