zentol commented on code in PR #23195:
URL: https://github.com/apache/flink/pull/23195#discussion_r1295742223


##########
tools/ci/verify_bundled_optional.sh:
##########
@@ -19,22 +19,16 @@
 
 ## Checks that all bundled dependencies are marked as optional in the poms
 MVN_CLEAN_COMPILE_OUT=$1
-CI_DIR=$2
-FLINK_ROOT=$3
 
-source "${CI_DIR}/maven-utils.sh"
+MVN=${MVN:-./mvnw}
 
-cd "$FLINK_ROOT" || exit
+dependency_plugin_output=/tmp/optional_dep.txt
 
-dependency_plugin_output=${CI_DIR}/optional_dep.txt
-
-run_mvn dependency:tree -B > "${dependency_plugin_output}"
+$MVN dependency:tree -B > "${dependency_plugin_output}"
 
 cat "${dependency_plugin_output}"
 
-cd "${CI_DIR}/flink-ci-tools/" || exit
-
-run_mvn exec:java 
-Dexec.mainClass=org.apache.flink.tools.ci.optional.ShadeOptionalChecker 
-Dexec.args=\""${MVN_CLEAN_COMPILE_OUT}" "${dependency_plugin_output}"\"
+$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

Review Comment:
   >  IIRC we don't check that the dependency-plugin call fails; in which case 
we pipe garbage into the checker which typically gives you this error.
   
   added a check to prevent this from silently happening.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to