yanghua commented on a change in pull request #3674: URL: https://github.com/apache/hudi/pull/3674#discussion_r716322867
########## File path: scripts/dependency.sh ########## @@ -0,0 +1,123 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set -eou pipefail +set -x + +export LC_ALL=C + +PWD=$(cd "$(dirname "$0")"/.. || exit; pwd) + +function printUsage() { + echo "Usage: $(basename "${0}") [-p <artifactId>] -r " 2>&1 + echo ' -r [OPTIONAL] to replace the old dependencyList file with new dependencies' + echo ' -p [MUST] to generate new dependencyList file for the specified module' +} + +function build_classpath() { + mvn dependency:build-classpath -pl :${PL} |\ + grep -E -v "INFO|WARNING" | \ + tr ":" "\n" | \ + awk -F '/' '{ + artifact_id=$(NF-2); + version=$(NF-1); + jar_name=$NF; + classifier_start_index=length(artifact_id"-"version"-") + 1; + classifier_end_index=index(jar_name, ".jar") - 1; + classifier=substr(jar_name, classifier_start_index, classifier_end_index - classifier_start_index + 1); + print artifact_id"/"version"/"classifier"/"jar_name Review comment: > shall we follow some existing convention to show the dependences? for example > > https://search.maven.org/artifact/org.apache.hudi/hudi-flink-bundle_2.12/0.9.0/jar > > the identifier pattern is `group:artifact:version` You can find the dependency is ordered by the artifact, right? IMO, it's easier to distinguish the different versions of one artifact. And view based on order artifacts is more suitable for human sense. Generally, People pay more attention to artifacts than group, right? But, yes, I agree that it's better to add group information. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org