Skip to content

Conversation

Lublanski
Copy link

Summary

This PR updates the spring-boot.rb formula to install CLI jars into libexec instead of lib, and creates a wrapper script in bin/spring.

Motivation

Installing JARs to lib is discouraged by Homebrew since it can cause conflicts between packages.
The recommended approach is to use libexec and symlink or wrap binaries into bin.

This change removes the following warning when installing with HOMEBREW_DEVELOPER=true:

Additionally, the completion installation was adjusted to avoid spurious warnings when completion scripts are not present in the distribution tarball.

Related Issue

Fixes spring-projects/spring-boot#46866

How to test

  1. Run brew install --build-from-source spring-boot.rb with HOMEBREW_DEVELOPER=true.
  2. No warnings should be displayed.
  3. spring --version should print the CLI version correctly.

Move the Spring Boot CLI jars from lib/ to libexec and create a
wrapper script in bin. This removes the Homebrew warning shown
when installing with HOMEBREW_DEVELOPER=true.

The formula now follows the recommended pattern used by other
Java formulae (e.g. activemq, jruby). Also adjusted completion
installation to avoid "empty array" warnings when completion
scripts are not present in the distribution tarball.

Signed-off-by: lublanski <[email protected]>
@Lublanski Lublanski force-pushed the fix/spring-boot-libexec branch from 5e7f7bd to a127063 Compare September 23, 2025 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix brew warnings for Spring Boot CLI
2 participants