This is an automated email from the ASF dual-hosted git repository. chesnay pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 78b5ddb11dfd2a3a00b58079fe9ee29a80555988 Author: Chesnay Schepler <ches...@apache.org> AuthorDate: Fri Aug 11 10:41:06 2023 +0200 [FLINK-32834] Rework parameter quoting The current quoting scheme wasn't compatible if run_mvn points directly to maven. This both blocks a follow-up where we skip maven-utils entirely in local runs, and makes it easier to copy&paste commands to/from the command-line. It was also not really intuitive. At all. This comes with a slight maintenance cost to maven-utils.sh#run_mvn, but given that we'll likely throw this out in 1.19 anyway (because there are better ways to implement this on later maven versions), we can bear that cost. --- tools/ci/license_check.sh | 2 +- tools/ci/maven-utils.sh | 6 ++---- tools/ci/verify_bundled_optional.sh | 2 +- tools/ci/verify_scala_suffixes.sh | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/ci/license_check.sh b/tools/ci/license_check.sh index 9bbcadab96a..7ba98c88eae 100755 --- a/tools/ci/license_check.sh +++ b/tools/ci/license_check.sh @@ -24,7 +24,7 @@ FLINK_DEPLOYED_ROOT=$4 source "${CI_DIR}/maven-utils.sh" -run_mvn -pl tools/ci/flink-ci-tools exec:java -Dexec.mainClass=org.apache.flink.tools.ci.licensecheck.LicenseChecker -Dexec.args=\"$MVN_CLEAN_COMPILE_OUT $FLINK_ROOT $FLINK_DEPLOYED_ROOT\" +run_mvn -pl tools/ci/flink-ci-tools exec:java -Dexec.mainClass=org.apache.flink.tools.ci.licensecheck.LicenseChecker -Dexec.args="$MVN_CLEAN_COMPILE_OUT $FLINK_ROOT $FLINK_DEPLOYED_ROOT" EXIT_CODE=$? if [ $EXIT_CODE != 0 ]; then diff --git a/tools/ci/maven-utils.sh b/tools/ci/maven-utils.sh index c42402ff3d9..15a92575feb 100755 --- a/tools/ci/maven-utils.sh +++ b/tools/ci/maven-utils.sh @@ -21,12 +21,10 @@ function run_mvn { MVN_CMD="${M2_HOME}/bin/mvn" fi - ARGS=$@ - INVOCATION="$MVN_CMD $MVN_GLOBAL_OPTIONS $ARGS" if [[ "$MVN_RUN_VERBOSE" != "false" ]]; then - echo "Invoking mvn with '$INVOCATION'" + echo "Invoking mvn with '$MVN_GLOBAL_OPTIONS ${@}'" fi - eval $INVOCATION + $MVN_CMD $MVN_GLOBAL_OPTIONS "${@}" } export -f run_mvn diff --git a/tools/ci/verify_bundled_optional.sh b/tools/ci/verify_bundled_optional.sh index a570ae92afb..d2c34e638db 100755 --- a/tools/ci/verify_bundled_optional.sh +++ b/tools/ci/verify_bundled_optional.sh @@ -32,7 +32,7 @@ run_mvn dependency:tree -B > "${dependency_plugin_output}" cat "${dependency_plugin_output}" -run_mvn -pl tools/ci/flink-ci-tools exec:java -Dexec.mainClass=org.apache.flink.tools.ci.optional.ShadeOptionalChecker -Dexec.args=\""${MVN_CLEAN_COMPILE_OUT}" "${dependency_plugin_output}"\" +run_mvn -pl tools/ci/flink-ci-tools exec:java -Dexec.mainClass=org.apache.flink.tools.ci.optional.ShadeOptionalChecker -Dexec.args="${MVN_CLEAN_COMPILE_OUT} ${dependency_plugin_output}" EXIT_CODE=$? if [ $EXIT_CODE != 0 ]; then diff --git a/tools/ci/verify_scala_suffixes.sh b/tools/ci/verify_scala_suffixes.sh index 22653d2dafb..b827a1c19f5 100755 --- a/tools/ci/verify_scala_suffixes.sh +++ b/tools/ci/verify_scala_suffixes.sh @@ -61,7 +61,7 @@ if [ $EXIT_CODE != 0 ]; then exit 1 fi -run_mvn -pl tools/ci/flink-ci-tools exec:java exec:java -Dexec.mainClass=org.apache.flink.tools.ci.suffixcheck.ScalaSuffixChecker -Dexec.args=\""${dependency_plugin_output}" "${FLINK_ROOT}"\" +run_mvn -pl tools/ci/flink-ci-tools exec:java exec:java -Dexec.mainClass=org.apache.flink.tools.ci.suffixcheck.ScalaSuffixChecker -Dexec.args="${dependency_plugin_output} ${FLINK_ROOT}" EXIT_CODE=$? if [ $EXIT_CODE == 0 ]; then