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
Refine documentation for bootBuildImage and use the additive form for lists and maps #32886
Comments
@bitbaggi This should work if you also add |
I don't think this is a bug. The syntax used is assigning a new tasks.named('bootBuildImage') {
environment['BP_NATIVE_IMAGE_BUILD_ARGUMENTS'] = '--verbose'
} Or add multiple entries like this: environment.putAll([
'BP_NATIVE_IMAGE_BUILD_ARGUMENTS': '--verbose',
'EXAMPLE': 'VALUE'
]) I think it's important that we support assignment replacing our defaults so that users can take complete control of the environment if needs be. |
We should review the documentation for |
Yeah, thank you @wilkinsona
|
Thanks for the confirmation, @bitbaggi. I'm going to re-open this issue so that we can review the documentation. |
Assigning a new value to environment replaces all mappings. By assigning to individual keys, the existing map is updated so defaults are preserved. See: spring-projects/spring-boot#32886
I've submitted an MR to update the documentation as discussed in this issue: #33424 |
Hello,
i have the normal vanilla Spring Boot 3.0.0-RC1 with only org.graalvm.buildtools.native as extra plugin.
You can download it from here Spring Initializr
When i try to build with gradlew bootBuildImage with buildpacks and environment it gives me an error.
My bootBuildImage task is configured in build.gradle:
The --verbose is only a test, i try to add a reflection-config.json to native image.
When i remove the environment part from task configuration everything is fine.
Did i anything wrong?
Can i not use environment and buildpacks in combination?
Thank you.
The text was updated successfully, but these errors were encountered: