Skip to content

Commit 8b642e5

Browse files
authored
chore: remove dependency list completeness check (#2797)
Reference for removal of this check in split-repositories - googleapis/synthtool#1663
1 parent 8bf2a73 commit 8b642e5

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

.kokoro/dependencies.sh

-51
Original file line numberDiff line numberDiff line change
@@ -65,54 +65,3 @@ if [ ! -z "${JAVA8_HOME}" ]; then
6565
fi
6666

6767
mvn -B dependency:analyze -DfailOnWarning=true
68-
69-
echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
70-
## Run dependency list completeness check
71-
function completenessCheck() {
72-
# Output dep list with compile scope generated using the original pom
73-
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
74-
# This is stripped from the output as it is not present in the flattened pom.
75-
# Only dependencies with 'compile' or 'runtime' scope are included from original dependency list.
76-
msg "Generating dependency list using original pom..."
77-
mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt
78-
79-
# Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes)
80-
msg "Generating dependency list using flattened pom..."
81-
mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt
82-
83-
# Compare two dependency lists
84-
msg "Comparing dependency lists..."
85-
diff .org-list.txt .new-list.txt >.diff.txt
86-
if [[ $? == 0 ]]
87-
then
88-
msg "Success. No diff!"
89-
else
90-
msg "Diff found. See below: "
91-
msg "You can also check .diff.txt file located in $1."
92-
cat .diff.txt
93-
return 1
94-
fi
95-
}
96-
97-
# Allow failures to continue running the script
98-
set +e
99-
100-
error_count=0
101-
for path in **/.flattened-pom.xml
102-
do
103-
# Check flattened pom in each dir that contains it for completeness
104-
dir=$(dirname "$path")
105-
pushd "$dir"
106-
completenessCheck "$dir"
107-
error_count=$(($error_count + $?))
108-
popd
109-
done
110-
111-
if [[ $error_count == 0 ]]
112-
then
113-
msg "All checks passed."
114-
exit 0
115-
else
116-
msg "Errors found. See log statements above."
117-
exit 1
118-
fi

0 commit comments

Comments
 (0)