You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this buildpack to build a native image, it will use paketo-buildpacks/native-image buildpack to run native-image command.
What if I configure the Native Build Tools Maven Plugin in my project, like this, then pass BP_MAVEN_BUILD_ARGUMENTS="-Pnative native:compile" during build time, I think there is no need to use paketo-buildpacks/native-image to run native-image command again. But in the current realization, the native-image will always be picked up, so I need to pass BP_NATIVE_IMAGE_BUILD_ARGUMENTS for it.
what is the best practice to build a native image?
Describe the Enhancement
Should support to choose use Native Build Tools Maven Plugin or use native-image separately.
Possible Solution
Motivation
The text was updated successfully, but these errors were encountered:
Thanks for opening this issue. We have discussed doing this.
Right now, the limitation is that the buildpacks expect the output of the Maven/Gradle build process to be a JAR/WAR. You can override the default and point them to a native-image build, but they still expect the file you're pointing at to be a JAR/WAR file (or if you point to the JAR/WAR from your build, then buildpacks will rebuild your native-image which is wrong).
We would also need a way to set the process types for the native-image binary and do SBOM scanning. Right now, that happens in the native-image buildpack.
For other reads and to help us gauge interest in this, please 👍 if this feature is of interest.
For the time being, the suggest path is to have your Maven/Gradle build produce a JAR/WAR file and enable native-image builds using the paketo-buildpacks/native-image buildpack. This should work roughly the same, but it runs native-image directly, instead of from Maven/Gradle.
When using this buildpack to build a native image, it will use paketo-buildpacks/native-image buildpack to run
native-image
command.What if I configure the Native Build Tools Maven Plugin in my project, like this, then pass
BP_MAVEN_BUILD_ARGUMENTS="-Pnative native:compile"
during build time, I think there is no need to usepaketo-buildpacks/native-image
to runnative-image
command again. But in the current realization, thenative-image
will always be picked up, so I need to passBP_NATIVE_IMAGE_BUILD_ARGUMENTS
for it.what is the best practice to build a native image?
Describe the Enhancement
Should support to choose use
Native Build Tools Maven Plugin
or usenative-image
separately.Possible Solution
Motivation
The text was updated successfully, but these errors were encountered: