This is an automated email from the ASF dual-hosted git repository.
dhanak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-tools.git
The following commit(s) were added to refs/heads/main by this push:
new cafd9c429ba kie-tools-issues#3166:
[serverless-logic-web-tools-swf-dev-mode-image] Wrong maven version (skip mvnw
use) (#3167)
cafd9c429ba is described below
commit cafd9c429bae8b842028aac516b36242454aba29
Author: Fabrizio Antonangeli <[email protected]>
AuthorDate: Thu Jul 17 08:24:10 2025 +0200
kie-tools-issues#3166: [serverless-logic-web-tools-swf-dev-mode-image]
Wrong maven version (skip mvnw use) (#3167)
Co-authored-by: Ricardo Zanini
<[email protected]>
---
.../resources/modules/kogito-maven/common/configure | 18 ++++++++----------
.../resources/modules/kogito-maven/common/module.yaml | 18 ++++++++++++++++--
2 files changed, 24 insertions(+), 12 deletions(-)
diff --git
a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/configure
b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/configure
index 2bed965e5da..cf4cf850ced 100755
---
a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/configure
+++
b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/configure
@@ -22,24 +22,22 @@ set -e
SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
-mvn_install_dir="/usr/share/maven"
+echo "---> Installing Apache Maven ${MAVEN_VERSION} to ${KOGITO_MAVEN_HOME}"
+
+tar -xzf "${SOURCES_DIR}/apache-maven-${MAVEN_VERSION}-bin.tar.gz" -C
/usr/share
# Verify if mvn is installed
-if [ ! -d ${mvn_install_dir} ] && ! command -v mvn > /dev/null 2>&1 ;
+if [ ! -d ${MAVEN_HOME} ] && ! command -v mvn > /dev/null 2>&1 ;
then
echo "---> Maven not found, downloading and installing it"
- tar xzf "${SOURCES_DIR}"/apache-maven-"${MAVEN_VERSION}"-bin.tar.gz -C
/usr/share
- mv /usr/share/apache-maven-"${MAVEN_VERSION}" ${mvn_install_dir}
+ mv /usr/share/apache-maven-"${MAVEN_VERSION}" ${MAVEN_HOME}
else
echo "---> Maven already present in the current context"
# TODO: Remove this temporary solution in favor of the
-DnoMavenVersionCheck flag once it's available
# https://github.com/quarkusio/quarkus/issues/46105
- # Installs Maven Wrapper for version 3.8.6 in order to be compatible with
the quarkus-maven-plugin minimum requirements (on Quarkus 3.15.3.1).
- echo "---> Installing Maven wrapper for Maven 3.8.6"
- cd "${MAVEN_HOME}"/bin
- mvn wrapper:wrapper -Dmaven=3.8.6 -Dtype=source
- echo "--> Validating Maven wrapper installation"
- ${MAVEN_CMD} --version
+ # Installs Maven for version 3.9.6 in order to be compatible with the
quarkus-maven-plugin minimum requirements (on Quarkus 3.15.3.1).
+ echo "---> Installing Maven 3.9.6"
+ ln -sf "${ALTERNATIVE_MAVEN_HOME}/bin/mvn" "${MAVEN_HOME}/bin/mvn"
fi
mkdir "${KOGITO_HOME}"/.m2
diff --git
a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
index c531636267d..41ebdf00772 100644
---
a/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
+++
b/packages/sonataflow-image-common/resources/modules/kogito-maven/common/module.yaml
@@ -23,16 +23,20 @@ version: "main"
envs:
- name: "MAVEN_VERSION"
description: "The Maven version to setup with this module"
+ value: "3.9.6"
- name: "MAVEN_HOME"
value: "/usr/share/maven"
- name: "MAVEN_CMD"
- value: "/usr/share/maven/bin/mvnw"
+ value: "/usr/share/maven/bin/mvn"
- name: "MAVEN_SETTINGS_PATH"
description: "The location of the settings.xml file"
value: "${KOGITO_HOME}/.m2/settings.xml"
- name: "MAVEN_CONTAINER_BUILD_SETTINGS_PATH"
description: "The location of the settings.xml file during container image
build"
value: "${KOGITO_HOME}/.m2/maven-m2-repo-via-http-settings.xml"
+ - name: "ALTERNATIVE_MAVEN_HOME"
+ description: " (Temporary Fix) Path to the alternative Maven installation
until a new base image with Maven 3.9 is available."
+ value: "/usr/share/apache-maven-3.9.6"
- name: "HTTP_PROXY"
description: "The location of the http proxy, will be used for both Maven
builds and Java runtime."
example: "http://127.0.0.1:8080"
@@ -47,7 +51,7 @@ envs:
- name: "HTTP_PROXY_USERNAME"
description: "Proxy Username"
- name: "HTTP_PROXY_NONPROXYHOSTS"
- description: "Non proxy hosts, list of hosts that will ot be proxied."
+ description: "Non proxy hosts, list of hosts that will not be proxied."
example: "localhost"
- name: "MAVEN_MIRROR_URL"
description: "The base URL of a mirror used for retrieving artifacts."
@@ -95,5 +99,15 @@ envs:
description: "When set to true, tells Maven to work in offline mode. See
Maven `-o` option for more information."
example: "true"
+packages:
+ manager: microdnf
+ install:
+ - gzip
+
+artifacts:
+ - name: apache-maven-3.9.6-bin.tar.gz
+ url:
https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
+ md5: fb90d9f8aa9ac18e8aa0a0842a09239f
+
execute:
- script: configure
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]