aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/combine_derived_java_srcs.sh
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2017-06-30 13:41:19 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-07-03 09:04:54 +0200
commit86c9d942452d82a479d499ffe61695a983f16bba (patch)
tree6cfba810a9cfa6e1d64df2e894c310b2f9247ad4 /src/combine_derived_java_srcs.sh
parente3312d97ab356d71cc5b6965de80b2189d547b80 (diff)
//src:derived_java_srcs: use jar from JAVABASE instead of PATH
The genrule //src:derived_java_srcs so far assumed to find the needed tool jar(1) on PATH. This, however, is not true in all setups. Instead, use jar from JAVABASE, which should be the correct toolchain to be used on the execution platform. Fixes #3284. Change-Id: I1f972f819786b511237c448a6c57484a76f4118b PiperOrigin-RevId: 160634222
Diffstat (limited to 'src/combine_derived_java_srcs.sh')
-rwxr-xr-xsrc/combine_derived_java_srcs.sh4
1 files changed, 3 insertions, 1 deletions
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 '{}' '+'