From 0004c0c6651021817df99863b9d0ff3c9711e406 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Thu, 30 May 2024 10:23:43 +0100 Subject: [PATCH] [OPENJDK-3029] Introduce and use maven-openjdk21 module Signed-off-by: Jonathan Dowland --- modules/maven/21/configure.sh | 12 ++++++++++++ modules/maven/21/module.yaml | 25 +++++++++++++++++++++++++ ubi8-openjdk-21.yaml | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 modules/maven/21/configure.sh create mode 100644 modules/maven/21/module.yaml diff --git a/modules/maven/21/configure.sh b/modules/maven/21/configure.sh new file mode 100755 index 00000000..84da8a53 --- /dev/null +++ b/modules/maven/21/configure.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +# This file is shipped by a Maven package and sets JAVA_HOME to +# an OpenJDK-specific path. This causes problems for OpenJ9 containers +# as the path is not correct for them. We don't need this in any of +# the containers because we set JAVA_HOME in the container metadata. +# Blank the file rather than removing it, to avoid a warning message +# from /usr/bin/mvn. +if [ -f /etc/java/maven.conf ]; then + :> /etc/java/maven.conf +fi diff --git a/modules/maven/21/module.yaml b/modules/maven/21/module.yaml new file mode 100644 index 00000000..8ada336d --- /dev/null +++ b/modules/maven/21/module.yaml @@ -0,0 +1,25 @@ +schema_version: 1 +name: jboss.container.maven +version: '3.8.21' +description: Provides Maven v3.8 capabilities to an image. + +labels: +- name: io.fabric8.s2i.version.maven + value: "3.8" + +envs: +- name: JBOSS_CONTAINER_MAVEN_38_MODULE + value: /opt/jboss/container/maven/38/ +- name: MAVEN_VERSION + value: '3.8' + +modules: + install: + - name: jboss.container.maven.module + +packages: + install: + - maven-openjdk21 + +execute: +- script: configure.sh diff --git a/ubi8-openjdk-21.yaml b/ubi8-openjdk-21.yaml index 5e04dd29..82898727 100644 --- a/ubi8-openjdk-21.yaml +++ b/ubi8-openjdk-21.yaml @@ -51,7 +51,7 @@ modules: - name: jboss.container.openjdk.jdk version: "21" - name: jboss.container.maven - version: "3.8.17" + version: "3.8.21" - name: jboss.container.util.tzdata - name: jboss.container.java.s2i.bash