From 8b642e5970bdafe85684c3fcc7f3b1787fe17574 Mon Sep 17 00:00:00 2001 From: Deepankar Dixit <90280028+ddixit14@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:21:31 +0000 Subject: [PATCH] chore: remove dependency list completeness check (#2797) Reference for removal of this check in split-repositories - https://github.com/googleapis/synthtool/pull/1663 --- .kokoro/dependencies.sh | 51 ----------------------------------------- 1 file changed, 51 deletions(-) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 6a9f719a5e6..3c613d6b56d 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -65,54 +65,3 @@ if [ ! -z "${JAVA8_HOME}" ]; then fi mvn -B dependency:analyze -DfailOnWarning=true - -echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" -## Run dependency list completeness check -function completenessCheck() { - # Output dep list with compile scope generated using the original pom - # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. - # This is stripped from the output as it is not present in the flattened pom. - # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. - msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt - - # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) - msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt - - # Compare two dependency lists - msg "Comparing dependency lists..." - diff .org-list.txt .new-list.txt >.diff.txt - if [[ $? == 0 ]] - then - msg "Success. No diff!" - else - msg "Diff found. See below: " - msg "You can also check .diff.txt file located in $1." - cat .diff.txt - return 1 - fi -} - -# Allow failures to continue running the script -set +e - -error_count=0 -for path in **/.flattened-pom.xml -do - # Check flattened pom in each dir that contains it for completeness - dir=$(dirname "$path") - pushd "$dir" - completenessCheck "$dir" - error_count=$(($error_count + $?)) - popd -done - -if [[ $error_count == 0 ]] -then - msg "All checks passed." - exit 0 -else - msg "Errors found. See log statements above." - exit 1 -fi