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

implement support for classpath.idx file #68

Closed plaird closed 3 years ago

plaird commented 3 years ago

This implements the solution for #33 for classpath.idx files. This is a new feature in Spring Boot 2.3.

https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-executable-jar-format.html#executable-jar-war-index-files-classpath

This PR allows you to pass in a classpath.idx file, which will be positioned inside the Spring Boot executable jar file.

springboot(
    name = "helloworld",
    boot_app_class = "com.sample.SampleMain",
    java_library = ":helloworld_lib",

    # if you have conflicting classes in dependency jar files, you can define the order in which the jars are loaded
    #  https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-executable-jar-format.html#executable-jar-war-index-files-classpath
    classpath_index = "helloworld_classpath.idx",
)