Class OracleMetadataOverrides


  • public final class OracleMetadataOverrides
    extends Object
    The Oracle JDBC driver includes a META-INF/native-image which enables a set of global flags we need to control better, so to ensure such flags do not interfere with requirements of other libraries.

    For this reason, the META-INF/native-image/native-image.properties resource is excluded explicitly; then we re-implement the equivalent directives using Quarkus build items.

    Other resources such as jni-config.json and resource-config.json are not excluded, so to ensure we match the recommendations from the Oracle JDBC engineering team and make it easier to pick up improvements in these when the driver gets updated.

    Regarding reflect-config.json, we also prefer excluding it for the time being even though it's strictly not necessary: the reason is that the previous driver version had a build-breaking mistake; this was fixed in version 21.3 so should no longer be necessary, but the previous driver had been tested more widely and would require it, so this would facilitate the option to revert to the older version in case of problems.

    • Constructor Detail

      • OracleMetadataOverrides

        public OracleMetadataOverrides()
    • Method Detail

      • build

        void build​(io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem> reflectiveClass)
        Should match the contents of reflect-config.json
        Parameters:
        reflectiveClass - buildItem producer
      • runtimeInitializeDriver

        void runtimeInitializeDriver​(io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem> runtimeInitialized,
                                     io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem> runtimeReinitialized)
      • excludeOracleDirectives

        void excludeOracleDirectives​(io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.nativeimage.ExcludeConfigBuildItem> nativeImageExclusions)
      • naughtyDriver

        io.quarkus.deployment.builditem.nativeimage.NativeImageAllowIncompleteClasspathBuildItem naughtyDriver()
      • enhancedCharsetSubstitutions

        io.quarkus.deployment.builditem.RemovedResourceBuildItem enhancedCharsetSubstitutions()
      • additionalResourceBundles

        io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem additionalResourceBundles()