XComp commented on code in PR #23195: URL: https://github.com/apache/flink/pull/23195#discussion_r1296771740
########## tools/ci/verify_scala_suffixes.sh: ########## @@ -37,20 +37,33 @@ # # The script uses 'mvn dependency:tree -Dincludes=org.scala-lang' to list Scala # dependent modules. -CI_DIR=$1 -FLINK_ROOT=$2 + + +usage() { + echo "Usage: $0 " + echo "" + echo "The environment variable MVN is used to specify the Maven binaries; defaults to 'mvnw'." + echo "See further details in the JavaDoc of ScalaSuffixChecker." +} + +while getopts 'h' o; do + case "${o}" in + h) + usage + exit 0 + ;; + esac +done + +MVN=${MVN:-./mvnw} echo "--- Flink Scala Dependency Analyzer ---" echo "Analyzing modules for Scala dependencies using 'mvn dependency:tree'." echo "If you haven't built the project, please do so first by running \"mvn clean install -DskipTests\"" -source "${CI_DIR}/maven-utils.sh" +dependency_plugin_output=/tmp/dep.txt -cd "$FLINK_ROOT" || exit - -dependency_plugin_output=${CI_DIR}/dep.txt - -run_mvn dependency:tree -Dincludes=org.scala-lang,:*_2.1*:: ${MAVEN_ARGUMENTS} >> "${dependency_plugin_output}" +$MVN dependency:tree -Dincludes=org.scala-lang,:*_2.1*:: ${MAVEN_ARGUMENTS} > "${dependency_plugin_output}" Review Comment: ```suggestion $MVN -T1 dependency:tree -Dincludes=org.scala-lang,:*_2.1*:: ${MAVEN_ARGUMENTS} > "${dependency_plugin_output}" ``` ########## tools/ci/verify_scala_suffixes.sh: ########## @@ -37,20 +37,33 @@ # # The script uses 'mvn dependency:tree -Dincludes=org.scala-lang' to list Scala # dependent modules. -CI_DIR=$1 -FLINK_ROOT=$2 + + +usage() { + echo "Usage: $0 " + echo "" + echo "The environment variable MVN is used to specify the Maven binaries; defaults to 'mvnw'." + echo "See further details in the JavaDoc of ScalaSuffixChecker." +} + +while getopts 'h' o; do + case "${o}" in + h) + usage + exit 0 + ;; + esac +done + +MVN=${MVN:-./mvnw} echo "--- Flink Scala Dependency Analyzer ---" echo "Analyzing modules for Scala dependencies using 'mvn dependency:tree'." echo "If you haven't built the project, please do so first by running \"mvn clean install -DskipTests\"" -source "${CI_DIR}/maven-utils.sh" +dependency_plugin_output=/tmp/dep.txt Review Comment: ```suggestion dependency_plugin_output=/tmp/dependency-tree-including-scala.txt ``` nit: We might want to give it a more meaningful name to differentiate it from the other dependency:tree temporary file. ...even if it's only a temporary file. That makes things easier to debug issues. ########## tools/ci/verify_scala_suffixes.sh: ########## @@ -37,20 +37,33 @@ # # The script uses 'mvn dependency:tree -Dincludes=org.scala-lang' to list Scala # dependent modules. -CI_DIR=$1 -FLINK_ROOT=$2 + + +usage() { + echo "Usage: $0 " Review Comment: ```suggestion echo "Usage: $0" ``` nit: just to avoid someone coming up with a hotfix PR ########## tools/ci/verify_bundled_optional.sh: ########## @@ -17,24 +17,51 @@ # limitations under the License. # +usage() { + echo "Usage: $0 <maven-build-output>" + echo " <maven-build-output> A file containing the output of the Maven build." + echo "" + echo "mvnw clean package > <maven-build-output>" + echo "" + echo "The environment variable MVN is used to specify the Maven binaries; defaults to 'mvnw'." + echo "See further details in the JavaDoc of ShadeOptionalChecker." +} + +while getopts 'h' o; do + case "${o}" in + h) + usage + exit 0 + ;; + esac +done + +if [[ "$#" != "1" ]]; then + usage + exit 1 +fi + ## 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 Review Comment: ```suggestion dependency_plugin_output=/tmp/dependency-tree.txt ``` nit -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org