[Java] Fix java doc building error (#10757)

This commit is contained in:
chaokunyang
2020-09-14 17:44:45 +08:00
committed by GitHub
parent 4c03f7ca2f
commit 1aad8aa39c
7 changed files with 31 additions and 8 deletions
+11
View File
@@ -17,6 +17,15 @@ cd "$WORKSPACE_DIR/java"
version=$(python -c "import xml.etree.ElementTree as ET; r = ET.parse('pom.xml').getroot(); print(r.find(r.tag.replace('project', 'version')).text);" | tail -n 1)
cd -
check_java_version() {
local VERSION
VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ ! $VERSION =~ 1.8 ]]; then
echo "Java version is $VERSION. Please install jkd8."
exit 1
fi
}
build_jars() {
local platform="$1"
local bazel_build="${2:-true}"
@@ -180,6 +189,8 @@ deploy_jars() {
fi
}
check_java_version
case "$1" in
linux) # build jars that only contains Linux binaries.
build_jars_linux