salesforce / rules_spring

Bazel rule for building Spring Boot apps as a deployable jar
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

Insert order into executable jar is not deterministic, causes classloading differences #72

Closed plaird closed 3 years ago

plaird commented 3 years ago

We had some issues with classes being classloaded in a different order, depending on the platform that built the Spring Boot jar. We believe this is caused by the springboot rule packaging step not specifying the insert order into the spring boot jar between:

We want the order to be as depicted above.

plaird commented 3 years ago

PR #75 improved this feature such that the insert order of dependencies into the Spring Boot jar follows the BUILD file order. The documentation has the details: https://github.com/salesforce/bazel-springboot-rule/blob/master/tools/springboot/unwanted_classes.md#classpath-ordering-using-the-build-file