Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 5136513

Browse files
chore: [java] remove flatten plugin dependency check (#1663) (#883)
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. Source-Link: https://togithub.com/googleapis/synthtool/commit/9266ddc3b17fc15f34d2fb88ce8c5f1a4bfe64b0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa
1 parent 8e34056 commit 5136513

File tree

2 files changed

+1
-52
lines changed

2 files changed

+1
-52
lines changed

Diff for: .github/.OwlBot.lock.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
16-
digest: sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8
16+
digest: sha256:ae72564aa9c368b9ccd96f4af21f87889fd83b9e60635b80844deb5a2ccd08aa

Diff for: .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)