@@ -57,54 +57,3 @@ retry_with_backoff 3 10 \
57
57
-Dclirr.skip=true
58
58
59
59
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