-
Notifications
You must be signed in to change notification settings - Fork 4
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
Spring boot maven plugin build image error #175
Comments
Hi, I am facing same error message when using this one in a kubernetes environment calling the We're based on this link. Did you happen to find a solution? |
Not yet , you are spot on with the analysis , the error is due to validation. I do see there is a flag in SB 3.4.x milestone to handle that , hoping that would be resolve the issue , but I am not sure. |
@BarDweller FYI to make sure this is on your radar. |
Hi, most likely the issue here is that the Spring Boot Maven plugin does not support Image Extensions (https://github.com/buildpacks/spec/blob/main/image_extension.md), and the UBI builder requires support for Extensions. I can see in the code https://github.com/spring-projects/spring-boot/blob/790002323558ba37cf43ebb2776dea8aa8842d5c/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/ApiVersions.java#L35 that the plugin is claiming support for platforms 0.3 thru 0.14, and Extensions have been present since 0.10 (although they are an optional part of the spec). (Although I also spot that it probably doesn't do 0.3 to 0.6 correctly, as the order of analyze & detect phases switched at 0.7, and the boot plugin code has it fixed as analyze,detect (valid for 0.7 onwards, incorrect for before)). By way of a little deeper explanation, Image Extensions are a feature of the Buildpacks spec that allow for modification of the Builder and Run images, the UBI builder is using this to install the appropriate language runtime (java/nodejs) from the ubi repository. The error Looking at the boot code that runs the lifecycle (https://github.com/spring-projects/spring-boot/blob/790002323558ba37cf43ebb2776dea8aa8842d5c/spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/build/Lifecycle.java) however, it would appear that the boot plugin does not include code to drive the extender phase. If you wish to build your spring boot project with the ubi builder, you will need to use a buildpack platform with support for extensions, such as the pack cli, or the snowdrop java-buildpack-client library. Might be worth raising an Issue against the boot plugin to have it support extensions too.. they have been around for a couple of years now =) |
Had a quick chat, and got pointed at spring-projects/spring-boot#41353 which is the spring boot issue to implement support for extensions.. |
I am trying to build spring boot build image with the builder as builder-ubi-base and getting an error "Failed to detect:detected order contains extensions that is not support by the creator", Execution failed with error code 22. Thanks
The text was updated successfully, but these errors were encountered: