spring-boot: install CLI jars into libexec and wrap binary #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the
spring-boot.rb
formula to install CLI jars intolibexec
instead oflib
, and creates a wrapper script inbin/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 intobin
.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
brew install --build-from-source spring-boot.rb
withHOMEBREW_DEVELOPER=true
.spring --version
should print the CLI version correctly.