Skip to content

Commit

Permalink
Rename MAVEN_ARGS to MVN_ARGS (#9660)
Browse files Browse the repository at this point in the history
Fixes windows issues with Maven 3.9.9
  • Loading branch information
romain-grecourt authored Jan 17, 2025
1 parent f419a62 commit 34d053e
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/actions/common/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ runs:
build-cache-${{ github.run_id }}-
- name: Exec
env:
MAVEN_ARGS: |
${{ env.MAVEN_ARGS }}
MVN_ARGS: |
${{ env.MVN_ARGS }}
-Dmaven.repo.local=${{ github.workspace }}/.m2/repository
run: ${{ inputs.run }}
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
env:
JAVA_VERSION: '21'
JAVA_DISTRO: 'oracle'
MAVEN_ARGS: |
MVN_ARGS: |
-B -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
artifact-name: io-helidon-artifacts-part-${{ matrix.moduleSet }}
artifact-path: staging
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-DreactorRule=default \
-DmoduleSet=${{ matrix.moduleSet }} \
-Dcache.loadSuffixes=javadoc,docs \
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- uses: ./.github/actions/common
with:
run: |
mvn ${MAVEN_ARGS} -N \
mvn ${MVN_ARGS} -N \
-Possrh-staging \
-Dartifact=io.helidon:helidon-all:${{ needs.create-tag.outputs.version }}:pom \
dependency:get
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
env:
JAVA_VERSION: '21'
JAVA_DISTRO: 'oracle'
MAVEN_ARGS: |
MVN_ARGS: |
-B -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
artifact-name: io-helidon-artifacts-part-${{ matrix.moduleSet }}
artifact-path: staging
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-DreactorRule=default \
-DmoduleSet=${{ matrix.moduleSet }} \
-Dcache.loadSuffixes=javadoc,docs \
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
JAVA_VERSION: 21
GRAALVM_VERSION: 21.0.3
JAVA_DISTRO: oracle
MAVEN_ARGS: |
MVN_ARGS: |
-B -fae -e
-Dmaven.wagon.httpconnectionManager.ttlSeconds=60
-Dmaven.wagon.http.retryHandler.count=3
Expand Down Expand Up @@ -88,8 +88,8 @@ jobs:
build-cache: read-write
maven-cache: read-write
run: |
mvn ${MAVEN_ARGS} build-cache:go-offline
mvn ${MAVEN_ARGS} -T8 \
mvn ${MVN_ARGS} build-cache:go-offline
mvn ${MVN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DskipTests \
-Ptests \
Expand All @@ -111,13 +111,11 @@ jobs:
with:
ref: ${{ inputs.ref }}
- uses: ./.github/actions/common
# disable others on windows
if: ${{ matrix.platform != 'windows' || matrix.moduleSet != 'others'}}
with:
build-cache: read-only
test-artifact-name: tests-${{ matrix.moduleSet }}-${{ matrix.platform }}
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-DreactorRule=tests \
-DmoduleSet=${{ matrix.moduleSet }} \
-Dsurefire.reportNameSuffix=${{ matrix.platform }} \
Expand All @@ -139,7 +137,7 @@ jobs:
build-cache: read-only
test-artifact-name: tests-tck-${{ matrix.moduleSet }}
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-DreactorRule=tck \
-DmoduleSet=${{ matrix.moduleSet }} \
verify
Expand All @@ -159,7 +157,7 @@ jobs:
with:
build-cache: read-only
run: |
mvn ${MAVEN_ARGS} -T8 \
mvn ${MVN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DreactorRule=default \
-DmoduleSet=${{ matrix.moduleSet }} \
Expand All @@ -185,7 +183,7 @@ jobs:
**/target/state-javadoc.xml
**/target/*-javadoc.jar
run: |
mvn ${MAVEN_ARGS} -T8 \
mvn ${MVN_ARGS} -T8 \
-Dorg.slf4j.simpleLogger.showThreadName=true \
-DreactorRule=default \
-DmoduleSet=${{ matrix.moduleSet }} \
Expand All @@ -209,7 +207,7 @@ jobs:
*/target/state-docs.xml
*/target/*-docs.jar
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-Dcache.recordSuffix=docs \
-f docs/pom.xml \
-Pjavadoc \
Expand Down Expand Up @@ -284,7 +282,7 @@ jobs:
native-image: ${{ matrix.packaging == 'native' }}
test-artifact-name: tests-archetypes-${{ matrix.group }}-${{ matrix.packaging }}
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f archetypes/archetypes/pom.xml \
-Darchetype.test.permutationStartIndex=${{ matrix.start }} \
-Darchetype.test.permutationEndIndex=${{ matrix.end }} \
Expand All @@ -305,7 +303,7 @@ jobs:
build-cache: read-only
test-artifact-name: tests-legacy-archetypes
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f archetypes/pom.xml \
-Darchetype.test.generatePermutations=false \
install
Expand All @@ -332,7 +330,7 @@ jobs:
build-cache: read-only
test-artifact-name: tests-packaging-${{ matrix.packaging }}-${{ matrix.platform }}
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f tests/integration/packaging/pom.xml \
-P${{ matrix.packaging }}-image \
verify
Expand Down Expand Up @@ -360,7 +358,7 @@ jobs:
native-image: true
test-artifact-name: tests-native-image-${{ matrix.module }}-${{ matrix.platform }}
run: |
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f tests/integration/packaging/pom.xml \
-pl ${{ matrix.module }} \
-Pnative-image \
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/build-examples.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2024 Oracle and/or its affiliates.
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,6 +72,6 @@ if [ "${HELIDON_VERSION}" != "${HELIDON_VERSION_IN_EXAMPLES}" ]; then
fi

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f "${WS_DIR}/helidon-examples/pom.xml" \
clean install
4 changes: 2 additions & 2 deletions etc/scripts/checkstyle.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2018, 2024 Oracle and/or its affiliates.
# Copyright (c) 2018, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -53,7 +53,7 @@ die(){ echo "${1}" ; exit 1 ;}
rm -f "${WS_DIR}"/target/checkstyle-*

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} checkstyle:checkstyle-aggregate \
mvn ${MVN_ARGS} checkstyle:checkstyle-aggregate \
-f "${WS_DIR}"/pom.xml \
-Dcheckstyle.output.format="plain" \
-Dcheckstyle.output.file="${RESULT_FILE}" \
Expand Down
4 changes: 2 additions & 2 deletions etc/scripts/copyright.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2018, 2024 Oracle and/or its affiliates.
# Copyright (c) 2018, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,7 +49,7 @@ readonly RESULT_FILE
die() { echo "${1}" ; exit 1 ;}

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-N -f ${WS_DIR}/pom.xml \
-Dhelidon.enforcer.output.file="${RESULT_FILE}" \
-Dhelidon.enforcer.rules=copyright \
Expand Down
14 changes: 7 additions & 7 deletions etc/scripts/smoketest.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#
# Copyright (c) 2019, 2024 Oracle and/or its affiliates.
# Copyright (c) 2019, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -63,10 +63,10 @@ for ((i=0;i<${#ARGS[@]};i++))
ARG=${ARGS[${i}]}
case ${ARG} in
"--staged")
MAVEN_ARGS="${MAVEN_ARGS} -Possrh-staging"
MVN_ARGS="${MVN_ARGS} -Possrh-staging"
;;
"--clean")
MAVEN_ARGS="${MAVEN_ARGS} -Dmaven.repo.local=.m2/repository"
MVN_ARGS="${MVN_ARGS} -Dmaven.repo.local=.m2/repository"
;;
"--version="*)
VERSION=${ARG#*=}
Expand Down Expand Up @@ -234,7 +234,7 @@ test_archetype(){
printf "\n*******************************************\n\n"

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} -U \
mvn ${MVN_ARGS} -U \
-DinteractiveMode=false \
-DarchetypeGroupId=io.helidon.archetypes \
-DarchetypeArtifactId="helidon-${ARCHETYPE}" \
Expand All @@ -249,7 +249,7 @@ test_archetype(){
printf "\n*******************************************\n\n"

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f "helidon-${ARCHETYPE}/pom.xml" \
clean package

Expand All @@ -268,7 +268,7 @@ test_archetype(){
printf "\n*******************************************\n\n"

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} \
mvn ${MVN_ARGS} \
-f "helidon-${ARCHETYPE}/pom.xml" \
-DskipTests \
-Pjlink-image \
Expand All @@ -294,7 +294,7 @@ readonly LOG_FILE
mkdir -p "${WORK_DIR}"

maven_settings > "${WORK_DIR}/settings.xml"
MAVEN_ARGS="${MAVEN_ARGS} -s ${WORK_DIR}/settings.xml"
MVN_ARGS="${MVN_ARGS} -s ${WORK_DIR}/settings.xml"

exec 1>> >(tee "${LOG_FILE}")
exec 2>> >(tee "${LOG_FILE}")
Expand Down
6 changes: 3 additions & 3 deletions etc/scripts/test-quickstarts.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e
#
# Copyright (c) 2024 Oracle and/or its affiliates.
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,7 +55,7 @@ if [ ! -x "${GRAALVM_HOME}/bin/native-image" ]; then
fi

# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} --version
mvn ${MVN_ARGS} --version

"${GRAALVM_HOME}"/bin/native-image --version;

Expand All @@ -78,6 +78,6 @@ readonly quickstarts="helidon-quickstart-mp helidon-quickstart-se"
for quickstart in ${quickstarts}; do
cd "${WS_DIR}/helidon-examples/examples/quickstarts/${quickstart}"
# shellcheck disable=SC2086
mvn ${MAVEN_ARGS} -e clean install -Pnative-image -DskipTests
mvn ${MVN_ARGS} -e clean install -Pnative-image -DskipTests
./target/"${quickstart}" -Dexit.on.started=!
done

0 comments on commit 34d053e

Please sign in to comment.