From 1954123e12845adbb3bc2a686f6d08f034401c29 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Thu, 23 Jan 2025 13:45:56 +0200 Subject: [PATCH] Register properties file accessed by postgresSQL driver --- .../jdbc/postgresql/deployment/JDBCPostgreSQLProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/jdbc/jdbc-postgresql/deployment/src/main/java/io/quarkus/jdbc/postgresql/deployment/JDBCPostgreSQLProcessor.java b/extensions/jdbc/jdbc-postgresql/deployment/src/main/java/io/quarkus/jdbc/postgresql/deployment/JDBCPostgreSQLProcessor.java index abc4f56e90893..b88ce76447f7e 100644 --- a/extensions/jdbc/jdbc-postgresql/deployment/src/main/java/io/quarkus/jdbc/postgresql/deployment/JDBCPostgreSQLProcessor.java +++ b/extensions/jdbc/jdbc-postgresql/deployment/src/main/java/io/quarkus/jdbc/postgresql/deployment/JDBCPostgreSQLProcessor.java @@ -14,6 +14,7 @@ import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.NativeImageFeatureBuildItem; import io.quarkus.deployment.builditem.SslNativeConfigBuildItem; +import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild; @@ -40,9 +41,12 @@ RuntimeReinitializedClassBuildItem runtimeReinitialize() { @BuildStep void registerDriver(BuildProducer jdbcDriver, + BuildProducer resources, SslNativeConfigBuildItem sslNativeConfigBuildItem) { jdbcDriver.produce(new JdbcDriverBuildItem(DatabaseKind.POSTGRESQL, "org.postgresql.Driver", "org.postgresql.xa.PGXADataSource")); + // Accessed in org.postgresql.Driver.loadDefaultProperties + resources.produce(new NativeImageResourceBuildItem("org/postgresql/driverconfig.properties")); } @BuildStep