Skip to content

Commit 9266ddc

Browse files
authored
chore: [java] remove flatten plugin dependency check (#1663)
chore: remove check for flatten plugin We have had the check for the flatten-maven-plugin in each Cloud Java client repository. However, the behavior of the plugin has been stable and its not each repository's responsibility to assert the plugin's behavior. A new check is going to be added at the googleapis/java-shared-config repository to assert the plugin's behavior when we upgrade its version.
1 parent acbd79d commit 9266ddc

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

synthtool/gcp/templates/java_library/.kokoro/dependencies.sh

-51
Original file line numberDiff line numberDiff line change
@@ -57,54 +57,3 @@ retry_with_backoff 3 10 \
5757
-Dclirr.skip=true
5858

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

0 commit comments

Comments
 (0)