diff --git a/spring_image.bzl b/spring_image.bzl index 41914ae..12755bf 100644 --- a/spring_image.bzl +++ b/spring_image.bzl @@ -137,7 +137,7 @@ def tar_jars(ctx, files, out): outputs = [out], # Create an empty tarball, then extract all the jars and append the contents into it. # TODO: get rid of the hardcoded bazel-out path in the first transform. - command = 'tar cf {out} -T /dev/null && if [ -s {scf} ]; then tar rhf {out} --transform "s,bazel-out/k8-fastbuild/bin/,BOOT-INF/classes/META-INF/," {scf}; fi && for i in {all_paths}; do {jar} xf $i && {jar} tf $i | tar rf {out} --transform "s,^,BOOT-INF/classes/," -T -; done'.format(out = out.path, all_paths = " ".join(paths), jar = jar_path, scf = spring_components_file.path), + command = 'tar cf {out} -T /dev/null && if [ -s {scf} ]; then tar rhf {out} --transform "s,bazel-out/.*/bin/,BOOT-INF/classes/META-INF/," {scf}; fi && for i in {all_paths}; do {jar} xf $i && {jar} tf $i | tar rf {out} --transform "s,^,BOOT-INF/classes/," -T -; done'.format(out = out.path, all_paths = " ".join(paths), jar = jar_path, scf = spring_components_file.path), ) def _application_copier_rule_impl(ctx):