[x] We need to fix the problem in Native Build Tools 0.9.25 that the maven goal of native:metadata-copy is not available in multi-module projects due to thread safety issues. Once this issue is fixed upstream, we will be able to refactor the Maven Profile for generateMetadata. Early surveys were on the Apache ShardingSphere side.
[x] After the above procedures are completed, we need to migrate the GraalVM Reachability Metadata under the test package to the main package so that it can be directly used downstream.
Please fill it out carefully, or it will be closed. 请认真填写,不然会直接关闭。
Enviroment
JDK Version(required):
GraalVM CE Dev 23.1.0 For JDK21
SpringBoot Version(required):
3.2.0-SNAPSHOT
dynamic-datasource-spring-boot-starter Version(required):
4.2.0-SNAPSHOT
druid Version(optional): Null.
Describe what happened
After #562 ,
baomidou/dynamic-datasource
provides complete GraalVM Native Image support and completes nativeTest verification in Github Actions. But there are some problems here. Downstream users still need to add reasonable GraalVM Reachability Metadata files themselves. Refer to https://github.com/baomidou/dynamic-datasource/tree/0d963934ac0b4c390e1048eeba3230344cad0dc8/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter .[x] We need to fix the problem in Native Build Tools 0.9.25 that the maven goal of
native:metadata-copy
is not available in multi-module projects due to thread safety issues. Once this issue is fixed upstream, we will be able to refactor the Maven Profile forgenerateMetadata
. Early surveys were on the Apache ShardingSphere side.[x] We need to convert the GraalVM Reachability Metadata file of this commit https://github.com/baomidou/dynamic-datasource/tree/0d963934ac0b4c390e1048eeba3230344cad0dc8/dynamic-datasource-spring-boot3-starter/src/test/resources/META-INF/native-image/com.baomidou/dynamic-datasource-spring-boot3-starter from the Standard form to the Conditional form. Adding a Conditional condition to json can prevent the downstream from using resources mentioned in GraalVM Reachability Metadata but not existing when building GraalVM Native Image.
[x] After the above procedures are completed, we need to migrate the GraalVM Reachability Metadata under the
test
package to themain
package so that it can be directly used downstream.[ ] Submit the library information to the GRM central repo. For https://github.com/oracle/graalvm-reachability-metadata/issues/153 .
[x] Although https://github.com/baomidou/dynamic-datasource/blob/0d963934ac0b4c390e1048eeba3230344cad0dc8/CONTRIBUTING.md has been mentioned, we still need to indicate in a more conspicuous place that downstream should not use
SpEL
functions in GraalVM Native Image . Unless https://github.com/spring-projects/spring-framework/issues/29548 is fixed, downstream should not bother with this feature.Expected Result:
Actual Result:
Steps to reproduce