-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
* Add Oliver bp-native profile #121
Open
anthonydahanne
wants to merge
1
commit into
odrotbohm:main
Choose a base branch
from
anthonydahanne:native-bp
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Comment out native profile customization, so that the default one provided by spring boot parent can add its required <BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE> tot he spring boot plugin * Comment out the spring-boot-maven-plugin customization - that turns the jar into an "executable" (<executable>true</executable>) that makes the jar no longer a jar (and hence can't be properly detected by BP) - that uses the spring boot thin layout that removes the Spring-Boot-Lib from the manifest which is required for BP detection Now using ./mvnw -Pnative,native-bp BP will do the native build; I've tested it, it works fine ``` 2024-04-05T17:50:24.251Z INFO 1 --- [restbucks] [ main] org.springsource.restbucks.Restbucks : Started Restbucks in 0.377 seconds (process running for 0.411) ``` Replacing java-native-image:beta with java:beta, and running ./mvnw -Pnative-bp should also work for a regular jar
I tried applying your changes on current main, tweaked the Java version back to 21, but still get this error:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Comment out native profile customization, so that the default one provided by spring boot parent can add its required
<BP_NATIVE_IMAGE>true</BP_NATIVE_IMAGE>
to the spring boot pluginComment out the spring-boot-maven-plugin customization
<executable>true</executable>
) that makes the jar no longer a jar (and hence can't be properly detected by BP)that uses the spring boot thin layout that removes the Spring-Boot-Lib from the manifest which is required for BP detection
Now using
./mvnw -Pnative,native-bp
BP will do the native build; I've tested it, it works fineReplacing
java-native-image:beta
withjava:beta
, and running./mvnw -Pnative-bp
should also work for a regular jar