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

Provide a list of packaged files (BOM) as an output #88

Open plaird opened 3 years ago

plaird commented 3 years ago

In addition to the executable jar, the rule should produce a Bill of Materials that lists everything packaged into the jar. This would allow rule users to use the BOM as an input into other rules, such as custom validation rules.

For example, we just discovered a service that was packaging 125 unnecessary dependencies. I have been thinking about how to add validation to signal this (e.g. should we error if BOOT-INF/lib count > 300?) and I think it would be better to externalize this instead of adding more logic to the springboot rule. If we write the BOM as a proper output, we could implement custom logic as we like.