blob: e6a54a8b3e29605647c7333b8208109b748ec519 [file] [log] [blame]
set -e -o pipefail
echo "Running Linkage Monitor check"
echo "Maven command: $(which mvn)"
mvn --version
# This script runs within the Bazel's sandbox directory and uses protoc
# generated within the Bazel project.
protoc_location=$(realpath "${RUNFILES_DIR}/com_google_protobuf/protoc")
if [ ! -x "${protoc_location}" ]; then
echo "${protoc_location} is not found or not executable"
exit 1
cd java
# Install the test BOM for Linkage Monitor
pushd test/linkage-monitor-check-bom
mvn -e -B install
# Linkage Monitor requires the artifacts to be available in local Maven
# repository.
mvn -e -B clean generate-sources install \
-Dhttps.protocols=TLSv1.2 \
-Dmaven.test.skip=true \
-Dprotobuf.basedir="../.." \
echo "Installed the artifacts to local Maven repository"
curl -O ""
echo "Running linkage-monitor-latest-all-deps.jar."
# The libraries in the BOM would detect incompatible changes via Linkage Monitor
java -Xmx2048m -jar linkage-monitor-latest-all-deps.jar \
echo "Finished running Linkage Monitor check"