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}"
```
Here we have to add `-T1` as well to make sure that the output is actually
parseable.
--
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]