Closed plaird closed 3 years ago
Merged, and this fix will be released in the next minor version (2.2). I don't want to cut a patch release 2.1.1 just for this. The workaround is fairly easy, hopefully uncommon as most Spring Boot devs likely have the JDK in path, and I expect to release 2.2 in the next few weeks anyway.
I added a release note about this to the 2.1 release text.
Thanks @mcamenzind for jumping on this!
The raw jar command that was added in 2.1.0 was not the only case. There was a java invocation further down in the file (see #121), which has been there for forever. So this issue has been around for a long time, the jar command was just another case of it.
We have had a couple of users hit this internally all of a sudden, which makes me want to get a patch release out. I am working on sending 2.1.1 shortly which includes this fix.
Reported from an internal user on Linux, but this is not platform specific. This bug was introduced in rules_spring 2.1.
The jar command should be coming from the Bazel configuration. But in #111 we added the usage of jar to the genmanifest subrule without wiring it to the Bazel env correctly. https://github.com/salesforce/rules_spring/blob/master/springboot/write_manifest.sh#L18
See the springboot_pkg.sh invocation of jar to see how to do that correctly: https://github.com/salesforce/rules_spring/blob/master/springboot/springboot_pkg.sh#L93
The workaround on rules_spring 2.1 is to have the user set the PATH to include JAVA_HOME/bin