HBASE-26871 shaded mapreduce and shaded byo-hadoop client artifacts contain no classes (#4279)
- add a test to the shaded artifact validation that checks for java classes Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
parent
55bc977279
commit
2af359caf0
|
@ -114,6 +114,10 @@ declare -i bad_artifacts=0
|
|||
declare -a bad_contents
|
||||
for artifact in "${artifact_list[@]}"; do
|
||||
bad_contents=($(jar tf "${artifact}" | grep -v -E "${allowed_expr}" || true))
|
||||
class_count=$(jar tf "${artifact}" | grep -c -E '\.class$' || true)
|
||||
if [ ${#bad_contents[@]} -eq 0 ] && [ "${class_count}" -lt 1 ]; then
|
||||
bad_contents=("The artifact contains no java class files.")
|
||||
fi
|
||||
if [ ${#bad_contents[@]} -gt 0 ]; then
|
||||
echo "[ERROR] Found artifact with unexpected contents: '${artifact}'"
|
||||
echo " Please check the following and either correct the build or update"
|
||||
|
|
|
@ -114,6 +114,10 @@ declare -i bad_artifacts=0
|
|||
declare -a bad_contents
|
||||
for artifact in "${artifact_list[@]}"; do
|
||||
bad_contents=($(jar tf "${artifact}" | grep -v -E "${allowed_expr}" || true))
|
||||
class_count=$(jar tf "${artifact}" | grep -c -E '\.class$' || true)
|
||||
if [ ${#bad_contents[@]} -eq 0 ] && [ "${class_count}" -lt 1 ]; then
|
||||
bad_contents=("The artifact contains no java class files.")
|
||||
fi
|
||||
if [ ${#bad_contents[@]} -gt 0 ]; then
|
||||
echo "[ERROR] Found artifact with unexpected contents: '${artifact}'"
|
||||
echo " Please check the following and either correct the build or update"
|
||||
|
|
Loading…
Reference in New Issue