Skip to content

Commit

Permalink
[cicd] Migrate to Java21
Browse files Browse the repository at this point in the history
  • Loading branch information
dizzzz committed Feb 23, 2025
1 parent a4b5e82 commit be4fd68
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: '17'
java-version: '21'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -36,7 +36,7 @@ jobs:
# Hack around #5450
- name: pull base image
run: |
docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java17-debian12:latest
docker pull --platform linux/amd64 --platform linux/arm64 gcr.io/distroless/java21-debian12:latest
- name: Build images
run: mvn -V -B -q -Pdocker -DskipTests -Ddependency-check.skip=true -P !mac-dmg-on-unix,!installer,!concurrency-stress-tests,!micro-benchmarks,skip-build-dist-archives clean package
- name: Check local images
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: '17'
java-version: '21'
server-id: github
settings-path: ${{ github.workspace }}
- name: Cache Maven packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permissions:
contents: read
env:
MAVEN_OPTS: -DtrimStackTrace=false -D'maven.resolver.transport=wagon'
DEV_JDK: '17'
DEV_JDK: '21'
jobs:
license:
name: License check
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
jvm: ['17', '21']
jvm: ['21']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-xqts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: '17'
java-version: '21'
- name: Cache Maven packages
uses: actions/cache@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: liberica
java-version: 17
java-version: 21
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
Expand Down
5 changes: 0 additions & 5 deletions exist-core-jmh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerVersion>${project.build.target}</compilerVersion>
<source>${project.build.source}</source>
<target>${project.build.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
7 changes: 4 additions & 3 deletions exist-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ The BaseX Team. The original license statement is also included below.]]></pream
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
Expand Down Expand Up @@ -1135,9 +1136,9 @@ The BaseX Team. The original license statement is also included below.]]></pream
<configuration>
<forceAjcCompile>true</forceAjcCompile> <!-- Required, otherwise the Aspects are not re-compiled when the src/main/java is recompiled for the test phase -->
<showWeaveInfo>true</showWeaveInfo>
<complianceLevel>${project.build.source}</complianceLevel>
<source>${project.build.source}</source>
<target>${project.build.target}</target>
<complianceLevel>${maven.compiler.release}</complianceLevel>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<!-- sources>
<source>
<basedir>${project.build.sourceDirectory}</basedir>
Expand Down
36 changes: 30 additions & 6 deletions exist-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@
</mailingLists>

<properties>
<project.build.source>17</project.build.source>
<project.build.target>17</project.build.target>
<maven.compiler.release>21</maven.compiler.release>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<project.copyright.name>The eXist-db Authors</project.copyright.name>
Expand Down Expand Up @@ -693,10 +694,8 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<version>3.14.0</version>
<configuration>
<source>${project.build.source}</source>
<target>${project.build.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
Expand Down Expand Up @@ -753,7 +752,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<configuration>
<source>${project.build.source}</source>
<source>${maven.compiler.release}</source>
<archive>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
Expand Down Expand Up @@ -977,6 +976,31 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>${maven.compiler.target}</version>
<message>eXist-db requires (at least) OpenJDK ${maven.compiler.target} to build and run.</message>
</requireJavaVersion>
<requireMavenVersion>
<message>Modern plugins require atleast maven 3.6.3.</message>
<version>3.6.3</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
Expand Down

0 comments on commit be4fd68

Please sign in to comment.