diff options
-rw-r--r-- | src/BUILD | 2 | ||||
-rwxr-xr-x | src/combine_derived_java_srcs.sh | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -399,7 +399,7 @@ genrule( "@googleapis//:dist_jars", ], outs = ["derived_java_srcs.zip"], - cmd = "$(location :combine_derived_java_srcs.sh) $@ $(SRCS)", + cmd = "$(location :combine_derived_java_srcs.sh) $(JAVABASE) $@ $(SRCS)", tools = ["combine_derived_java_srcs.sh"], visibility = ["//:__pkg__"], ) diff --git a/src/combine_derived_java_srcs.sh b/src/combine_derived_java_srcs.sh index 7a306a69c3..e28c8c7bb9 100755 --- a/src/combine_derived_java_srcs.sh +++ b/src/combine_derived_java_srcs.sh @@ -18,6 +18,8 @@ set -eu # Combine src jars to a single archive containing all the source files. +JAVABASE="${PWD}/$1" +shift OUTPUT="${PWD}/$1" shift @@ -30,7 +32,7 @@ mkdir -p "${JAVA_SRC_DIR}" for i in $* do JARFILE="${PWD}/$i" - (cd "${JAVA_SRC_DIR}" && jar xf "${JARFILE}") + (cd "${JAVA_SRC_DIR}" && "${JAVABASE}/bin/jar" xf "${JARFILE}") done find "${PACKAGE_DIR}" -exec touch -t 198001010000.00 '{}' '+' |