Bazel + Spring Boot

2,602 views
Skip to first unread message

Ofer Bartal

unread,
Jun 11, 2018, 3:47:56 PM6/11/18
to bazel-discuss
Hey,
Do we know of any project that uses Bazel and Spring Boot?

Thanks!
Ofer

peter.v...@gmail.com

unread,
Jun 12, 2018, 6:36:20 AM6/12/18
to bazel-discuss
Hi Ofer,

There are at least a couple of options (the last time this was discussed in https://groups.google.com/forum/#!topic/bazel-discuss/x_Xz-wgktwE):

* https://github.com/salesforce/bazel-springboot-rule
* https://gist.github.com/Zetten/4918d56da9e4edb7bdc7192b9f648b8f

I would be interested to know if anyone else has made progress on packaging though.

The harder part IMO is dependency management - you really need something to generate Bazel rules for Spring Boot's Starters (or do the equivalent manually). I adapted a Gradle script to make use of the easier dependency specification and resolution: https://gist.github.com/Zetten/8cf873195f1680ba7278dfd22257301d (`gradle generateWorkspace` - takes a few minutes as it has to test availability of each artifact in each repo).

Fortunately for this aspect there are other options, e.g. https://github.com/bazelbuild/migration-tooling or https://github.com/jart/bazel/tree/ef0328910fd61a7e77f4c56443d87365eeac7174/tools/build_defs/repo/maven_config_generator

Hope this helps!

-Peter

Jingwen Chen

unread,
Aug 9, 2019, 12:23:57 AM8/9/19
to peter.v...@gmail.com, bazel-discuss
Reviving the thread for future readers: there's now an example for Spring Boot builds and tests using rules_jvm_external as the transitive dependency resolver.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/63b8167c-61f9-47e7-9e33-9dc42d9b3349%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages