From 33232a0d41dd32ecadf2efe6d010b1277a0ed761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mari=C3=A1n=20Kon=C4=8Dek?= Date: Mon, 22 Jan 2024 15:05:14 +0100 Subject: [PATCH] Add OpenJDK 21 binding Related: RHEL-17126 --- .maven.metadata | 1 + gating.yaml | 2 ++ maven.spec | 22 +++++++++++++++++++++- plans/javapackages-jdk11.fmf | 1 + plans/javapackages-jdk17.fmf | 1 + plans/javapackages-jdk21.fmf | 13 +++++++++++++ plans/javapackages-jdk8.fmf | 1 + plans/smoke-jdk11.fmf | 1 + plans/smoke-jdk17.fmf | 1 + plans/smoke-jdk21.fmf | 9 +++++++++ plans/smoke-jdk8.fmf | 1 + 11 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .maven.metadata create mode 100644 plans/javapackages-jdk21.fmf create mode 100644 plans/smoke-jdk21.fmf diff --git a/.maven.metadata b/.maven.metadata new file mode 100644 index 0000000..df4252a --- /dev/null +++ b/.maven.metadata @@ -0,0 +1 @@ +976a947711e82f11f47c7b128dd8df903642075b apache-maven-3.8.5-src.tar.gz diff --git a/gating.yaml b/gating.yaml index 24a4107..c3787cd 100644 --- a/gating.yaml +++ b/gating.yaml @@ -8,6 +8,8 @@ rules: - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk8.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk11.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk17.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/smoke-jdk21.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk8.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk11.functional} - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk17.functional} + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./plans/javapackages-jdk21.functional} diff --git a/maven.spec b/maven.spec index b184e14..77dbb0f 100644 --- a/maven.spec +++ b/maven.spec @@ -7,7 +7,7 @@ Name: maven Epoch: 1 Version: 3.8.5 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Java project management and project comprehension tool # maven itself is ASL 2.0 # bundled slf4j is MIT @@ -147,6 +147,18 @@ Conflicts: maven-jdk-binding %description openjdk17 Configures Maven to run with OpenJDK 17. +%package openjdk21 +Summary: OpenJDK 21 binding for Maven +RemovePathPostfixes: -openjdk21 +Provides: maven-jdk-binding = %{epoch}:%{version}-%{release} +Requires: maven = %{epoch}:%{version}-%{release} +Requires: java-21-openjdk-headless +Recommends: java-21-openjdk-devel +Conflicts: maven-jdk-binding + +%description openjdk21 +Configures Maven to run with OpenJDK 21. + %{?javadoc_package} %prep @@ -256,6 +268,7 @@ install -d -m 755 %{buildroot}%{_javaconfdir}/ echo JAVA_HOME=%{_jvmlibdir}/jre-1.8.0-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk8 echo JAVA_HOME=%{_jvmlibdir}/jre-11-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk11 echo JAVA_HOME=%{_jvmlibdir}/jre-17-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk17 +echo JAVA_HOME=%{_jvmlibdir}/jre-21-openjdk >%{buildroot}%{_javaconfdir}/maven.conf-openjdk21 %post @@ -301,7 +314,14 @@ if [[ $1 -eq 0 ]]; then update-alternatives --remove mvn %{homedir}/bin/mvn; fi %files openjdk17 %config %{_javaconfdir}/maven.conf-openjdk17 +%files openjdk21 +%config %{_javaconfdir}/maven.conf-openjdk21 + %changelog +* Mon Jan 22 2024 Marián Konček - 1:3.8.5-5 +- Add OpenJDK 21 binding +- Related: RHEL-17126 + * Thu Feb 02 2023 Mikolaj Izdebski - 1:3.8.5-4 - Turn hard dependency on java-devel into a weak dependencny - Resolves: rhbz#2165591 diff --git a/plans/javapackages-jdk11.fmf b/plans/javapackages-jdk11.fmf index 6bfdb67..a0291f9 100644 --- a/plans/javapackages-jdk11.fmf +++ b/plans/javapackages-jdk11.fmf @@ -5,6 +5,7 @@ prepare: exclude: - maven-openjdk8 - maven-openjdk17 + - maven-openjdk21 discover: how: fmf url: https://pagure.io/javapackages-validator-tests diff --git a/plans/javapackages-jdk17.fmf b/plans/javapackages-jdk17.fmf index ae04747..3ae6a77 100644 --- a/plans/javapackages-jdk17.fmf +++ b/plans/javapackages-jdk17.fmf @@ -5,6 +5,7 @@ prepare: exclude: - maven-openjdk8 - maven-openjdk11 + - maven-openjdk21 discover: how: fmf url: https://pagure.io/javapackages-validator-tests diff --git a/plans/javapackages-jdk21.fmf b/plans/javapackages-jdk21.fmf new file mode 100644 index 0000000..363b73d --- /dev/null +++ b/plans/javapackages-jdk21.fmf @@ -0,0 +1,13 @@ +summary: + Run javapackages-specific tests - OpenJDK 21 +prepare: + how: install + exclude: + - maven-openjdk8 + - maven-openjdk11 + - maven-openjdk17 +discover: + how: fmf + url: https://pagure.io/javapackages-validator-tests +execute: + how: tmt diff --git a/plans/javapackages-jdk8.fmf b/plans/javapackages-jdk8.fmf index d35bc4e..0bbdcf0 100644 --- a/plans/javapackages-jdk8.fmf +++ b/plans/javapackages-jdk8.fmf @@ -5,6 +5,7 @@ prepare: exclude: - maven-openjdk11 - maven-openjdk17 + - maven-openjdk21 discover: how: fmf url: https://pagure.io/javapackages-validator-tests diff --git a/plans/smoke-jdk11.fmf b/plans/smoke-jdk11.fmf index 4ad3c5f..b3eb9f7 100644 --- a/plans/smoke-jdk11.fmf +++ b/plans/smoke-jdk11.fmf @@ -4,5 +4,6 @@ prepare: exclude: - maven-openjdk8 - maven-openjdk17 + - maven-openjdk21 execute: script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar diff --git a/plans/smoke-jdk17.fmf b/plans/smoke-jdk17.fmf index 1200458..7aad03d 100644 --- a/plans/smoke-jdk17.fmf +++ b/plans/smoke-jdk17.fmf @@ -4,5 +4,6 @@ prepare: exclude: - maven-openjdk8 - maven-openjdk11 + - maven-openjdk21 execute: script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar diff --git a/plans/smoke-jdk21.fmf b/plans/smoke-jdk21.fmf new file mode 100644 index 0000000..ae146b7 --- /dev/null +++ b/plans/smoke-jdk21.fmf @@ -0,0 +1,9 @@ +summary: Basic smoke test - OpenJDK 21 +prepare: + how: install + exclude: + - maven-openjdk8 + - maven-openjdk11 + - maven-openjdk17 +execute: + script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar diff --git a/plans/smoke-jdk8.fmf b/plans/smoke-jdk8.fmf index c83338c..2b3c020 100644 --- a/plans/smoke-jdk8.fmf +++ b/plans/smoke-jdk8.fmf @@ -4,5 +4,6 @@ prepare: exclude: - maven-openjdk11 - maven-openjdk17 + - maven-openjdk21 execute: script: mvn -V dependency:get -Dartifact=junit:junit:4.12 && stat $HOME/.m2/repository/junit/junit/4.12/junit-4.12.jar