11#! /bin/bash
2- # Copyright 2019 Google LLC
2+ # Copyright 2025 Google LLC
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
66# You may obtain a copy of the License at
77#
8- # http ://www.apache.org/licenses/LICENSE-2.0
8+ # https ://www.apache.org/licenses/LICENSE-2.0
99#
1010# Unless required by applicable law or agreed to in writing, software
1111# distributed under the License is distributed on an "AS IS" BASIS,
@@ -42,54 +42,41 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
4242 export GOOGLE_APPLICATION_CREDENTIALS=$( realpath ${KOKORO_GFILE_DIR} /${GOOGLE_APPLICATION_CREDENTIALS} )
4343fi
4444
45+
4546RETURN_CODE=0
4647set +e
4748
4849case ${JOB_TYPE} in
4950test)
5051 echo " SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT} "
51- mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
52+ mvn test -B -ntp -Dfmt.skip=true - Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
5253 RETURN_CODE=$?
5354 ;;
5455lint)
55- mvn com.coveo :fmt-maven-plugin:check -B -ntp
56+ mvn com.spotify.fmt :fmt-maven-plugin:check -B -ntp
5657 RETURN_CODE=$?
5758 ;;
5859javadoc)
59- mvn javadoc:javadoc javadoc:test-javadoc -B -ntp
60+ mvn javadoc:javadoc javadoc:test-javadoc -B -ntp -Dfmt.skip=true
6061 RETURN_CODE=$?
6162 ;;
6263integration)
63- # Kokoro integration tests use both JDK 11 and JDK 8. Integration
64- # tests require JDK 11 export as JAVA env variable to run cloud datastore
65- # emulator (https://cloud.google.com/sdk/docs/release-notes#39300_2022-07-12).
66- # For Java 8 environment, we will still run the tests using Java 8 with
67- # SUREFIRE_JVM_OPT for Maven surefire plugin:
68- # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
69- if [[ -n " ${JAVA11_HOME} " && -n " ${JAVA8_HOME} " ]]
70- then
71- export JAVA=${JAVA11_HOME} /bin/java
72- export SUREFIRE_JVM_OPT=-Djvm=${JAVA8_HOME} /bin/java
73- fi
74-
7564 mvn -B ${INTEGRATION_TEST_ARGS} \
7665 -ntp \
7766 -Penable-integration-tests \
7867 -DtrimStackTrace=false \
7968 -Dclirr.skip=true \
8069 -Denforcer.skip=true \
70+ -Dcheckstyle.skip=true \
71+ -DskipUnitTests=true \
72+ -Dfmt.skip=true \
8173 -fae \
8274 verify
8375 RETURN_CODE=$?
8476 ;;
8577graalvm)
8678 # Run Unit and Integration Tests with Native Image
87- mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
88- RETURN_CODE=$?
89- ;;
90- graalvm17)
91- # Run Unit and Integration Tests with Native Image
92- mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test
79+ mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative test -Dfmt.skip=true
9380 RETURN_CODE=$?
9481 ;;
9582samples)
@@ -113,6 +100,7 @@ samples)
113100 -DtrimStackTrace=false \
114101 -Dclirr.skip=true \
115102 -Denforcer.skip=true \
103+ -Dfmt.skip=true \
116104 -fae \
117105 verify
118106 RETURN_CODE=$?
@@ -122,7 +110,7 @@ samples)
122110 fi
123111 ;;
124112clirr)
125- mvn -B -ntp -Denforcer.skip=true clirr:check
113+ mvn -B -ntp -Dfmt.skip=true - Denforcer.skip=true clirr:check
126114 RETURN_CODE=$?
127115 ;;
128116* )
0 commit comments