Remove native-image.properties from micrometer-core (original) (raw)

Please describe the feature request.

Remove -H:ReflectionConfigurationResources=${.}/reflect-config.json from native-image.properties file.
The option should not be necessary for native-image to pick up the reflect-config.json file, while with this option included native builds using GraalVM for JDK 21 print the following warning:

Warning: The option '-H:ReflectionConfigurationResources=META-INF/native-image/io.micrometer/micrometer-core/reflect-config.json' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.

The option is passed in https://github.com/micrometer-metrics/micrometer/blob/3513df3780ab2fe1119ec2f9a6099ddcff7e7544/micrometer-core/src/main/resources/META-INF/native-image/io.micrometer/micrometer-core/native-image.properties#L17C8-L17C68

Rationale
As noted in the warning the use of '-H:ReflectionConfigurationResources=` is experimental and should thus be avoided.

Additional context

Reproducer:

wget https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.0/graalvm-community-jdk-21.0.0_linux-x64_bin.tar.gz
wget https://repo1.maven.org/maven2/io/micrometer/micrometer-core/1.11.5/micrometer-core-1.11.5.jar
tar xf graalvm-community-jdk-21.0.0_linux-x64_bin.tar.gz
cat > Main.java <<EOF                                                                                                                                                                     
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
EOF
./graalvm-community-openjdk-21+35.1/bin/javac Main.java
./graalvm-community-openjdk-21+35.1/bin/native-image -cp ./micrometer-core-1.11.5.jar:./ Main