Closed dmikusa closed 1 year ago
GraalVM is now generating a deprecation warning message when this environment variable is set:
[creator] Paketo Buildpack for Native Image 5.12.1
[creator] https://github.com/paketo-buildpacks/native-image
[creator] Build Configuration:
[creator] $BP_BINARY_COMPRESSION_METHOD Compression mechanism used to reduce binary size. Options: `none` (default), `upx` or `gzexe`
[creator] $BP_NATIVE_IMAGE true enable native image build
[creator] $BP_NATIVE_IMAGE_BUILD_ARGUMENTS arguments to pass to the native-image command
[creator] $BP_NATIVE_IMAGE_BUILD_ARGUMENTS_FILE a file with arguments to pass to the native-image command
[creator] $BP_NATIVE_IMAGE_BUILT_ARTIFACT the built application artifact explicitly, required if building from a JAR
[creator] Native Image: Contributing to layer
[creator] Executing native-image --no-fallback -H:Name=/layers/paketo-buildpacks_native-image/native-image/example.ExampleApplication -cp /workspace:/workspace/BOOT-INF/classes:/workspace/BOOT-INF/lib/spring-webmvc-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-web-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-boot-autoconfigure-3.2.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-boot-3.2.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/jakarta.annotation-api-2.1.1.jar:/workspace/BOOT-INF/lib/spring-context-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-aop-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-beans-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-expression-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/spring-core-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/snakeyaml-2.0.jar:/workspace/BOOT-INF/lib/jackson-datatype-jsr310-2.15.2.jar:/workspace/BOOT-INF/lib/jackson-module-parameter-names-2.15.2.jar:/workspace/BOOT-INF/lib/jackson-annotations-2.15.2.jar:/workspace/BOOT-INF/lib/jackson-core-2.15.2.jar:/workspace/BOOT-INF/lib/jackson-datatype-jdk8-2.15.2.jar:/workspace/BOOT-INF/lib/jackson-databind-2.15.2.jar:/workspace/BOOT-INF/lib/tomcat-embed-websocket-10.1.10.jar:/workspace/BOOT-INF/lib/tomcat-embed-core-10.1.10.jar:/workspace/BOOT-INF/lib/tomcat-embed-el-10.1.10.jar:/workspace/BOOT-INF/lib/micrometer-observation-1.10.9.jar:/workspace/BOOT-INF/lib/logback-classic-1.4.8.jar:/workspace/BOOT-INF/lib/log4j-to-slf4j-2.20.0.jar:/workspace/BOOT-INF/lib/jul-to-slf4j-2.0.7.jar:/workspace/BOOT-INF/lib/spring-jcl-6.1.0-SNAPSHOT.jar:/workspace/BOOT-INF/lib/micrometer-commons-1.10.9.jar:/workspace/BOOT-INF/lib/logback-core-1.4.8.jar:/workspace/BOOT-INF/lib/slf4j-api-2.0.7.jar:/workspace/BOOT-INF/lib/log4j-api-2.20.0.jar example.ExampleApplication
[creator] Warning: The USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM environment variable is deprecated and might be removed in a future release. Please refer to the GraalVM release notes.
[creator] ================================================================================
[creator] GraalVM Native Image: Generating 'example.ExampleApplication' (executable)...
[creator] ================================================================================
[creator] [1/8] Initializing... (6.8s @ 0.15GB)
[creator] Java version: 17.0.7+7-LTS, vendor version: Liberica-NIK-23.0.0-1
Describe the Enhancement
We no longer need the workaround to set
USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM
, see https://github.com/paketo-buildpacks/native-image/issues/176#issuecomment-1353201623.Possible Solution
Remove the code that will set this.
Motivation
GraalVM has evolved and we do not need this any more.