9696 run : |
9797 LIB_DIR="${{matrix.repo}}"
9898 LIB_NAME="google-cloud-${LIB_DIR#java-}"
99- mvn install -pl ${LIB_DIR}/${LIB_NAME} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
99+ TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
100+ # Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
101+ if [ ! -d "${TARGET_PATH}" ]; then
102+ # Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
103+ ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
104+ if [ -n "${ALT_PATH}" ]; then
105+ TARGET_PATH="${ALT_PATH}"
106+ else
107+ # Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
108+ TARGET_PATH="${LIB_DIR}"
109+ fi
110+ fi
111+ mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
100112 - run : .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
101113 javadoc-with-doclet :
102114 needs : filter
@@ -113,8 +125,8 @@ jobs:
113125 - java-spanner
114126 - java-spanner-jdbc
115127 - java-pubsub
116- - java-pubsublite
117128 - java-logging
129+ - java-logging-logback
118130 - java-firestore
119131 - java-datastore
120132 - java-bigquerystorage
@@ -136,5 +148,17 @@ jobs:
136148 run : |
137149 LIB_DIR="${{matrix.repo}}"
138150 LIB_NAME="google-cloud-${LIB_DIR#java-}"
139- mvn install -pl ${LIB_DIR}/${LIB_NAME} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
151+ TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
152+ # Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
153+ if [ ! -d "${TARGET_PATH}" ]; then
154+ # Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
155+ ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
156+ if [ -n "${ALT_PATH}" ]; then
157+ TARGET_PATH="${ALT_PATH}"
158+ else
159+ # Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
160+ TARGET_PATH="${LIB_DIR}"
161+ fi
162+ fi
163+ mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
140164 - run : .kokoro/client-library-check-doclet.sh ${{matrix.repo}}
0 commit comments