Description
Describe the Enhancement
When buildpacks are building a project from source, it is possible for the project to include the Maven or Gradle Native Build Tools plugin and configure the command line for the Maven (mvn -Pnative package
) or Gradle (gradle nativeCompile
) build to generate a native executable instead of a jar or war archive. The native-image
buildpack currently fails in this scenario, as it expects its input to be a jar or war archive. It would be nice if the native-image
buildpack would detect this scenario and skip the invocation of the native-image
tool.
Motivation
Building a native executable directly from the build system might not be as common as building an archive for input to buildpacks, but advances in the NBT build plugins as well as build plugins from frameworks like Spring Boot are making this easier to do. When customization of the native-image
command is required, it might be easier for users to configure this customization in a Maven pom.xml
or Gradle build.gradle
file than by providing BP_NATIVE_IMAGE_BUILD_ARGUMENTS
or BP_NATIVE_IMAGE_BUILD_ARGUMENTS_FILE
environment variables to the buildpack platform.