I think it should be possible to reduce the number of buildpacks from 2 to 1. They do basically the same except for a single argument passed to mvn and the command that gets executed by the final runner image.
The way I see it in the build we could detect if native-image is available on the path and if so do native compilation. If not we just do normal compilation.
But perhaps we can even make it an option somehow, that way we could even reduce the number of stacks.
I think it should be possible to reduce the number of buildpacks from 2 to 1. They do basically the same except for a single argument passed to
mvn
and the command that gets executed by the final runner image.The way I see it in the
build
we could detect ifnative-image
is available on the path and if so do native compilation. If not we just do normal compilation.But perhaps we can even make it an option somehow, that way we could even reduce the number of stacks.