From d050db4c1a46d8a17b0a11fd2c09b44b3cce90a6 Mon Sep 17 00:00:00 2001 From: gmunozfe Date: Fri, 20 Dec 2024 09:53:16 +0100 Subject: [PATCH] [Fixes_#2045] Native build failing in examples with persistence --- .../serverless-workflow-callback-quarkus/pom.xml | 4 ++++ .../src/main/resources/application.properties | 1 + .../serverless-workflow-compensation-quarkus/pom.xml | 4 ++++ .../src/main/resources/application.properties | 3 ++- .../serverless-workflow-correlation-quarkus/pom.xml | 4 ++++ .../src/main/resources/application.properties | 2 ++ .../serverless-workflow-data-index-quarkus/pom.xml | 4 ++++ .../src/main/resources/application.properties | 4 +++- 8 files changed, 24 insertions(+), 2 deletions(-) diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml index 0624ec72db..953fb55ba7 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/pom.xml @@ -110,6 +110,10 @@ io.quarkus quarkus-jdbc-postgresql + + io.quarkus + quarkus-flyway + io.quarkus quarkus-agroal diff --git a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties index 58758db2d8..46b4dfe665 100644 --- a/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-callback-quarkus/src/main/resources/application.properties @@ -66,6 +66,7 @@ kogito.persistence.proto.marshaller=false kie.flyway.enabled=true quarkus.native.native-image-xmx=8g +quarkus.native.additional-build-args=--initialize-at-run-time=org.postgresql.sspi.SSPIClient # profile to pack this example into a container, to use it execute activate the maven container profile, -Dcontainer %container.quarkus.container-image.build=true diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml index 41b0cbd1a1..2e6a3e91d8 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/pom.xml @@ -191,6 +191,10 @@ io.quarkus quarkus-agroal + + io.quarkus + quarkus-flyway + diff --git a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties index 654ba0b374..377cae6b19 100644 --- a/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-compensation-quarkus/src/main/resources/application.properties @@ -20,6 +20,7 @@ # Packaging # quarkus.package.type=fast-jar quarkus.native.native-image-xmx=8g +quarkus.native.additional-build-args=--initialize-at-run-time=org.postgresql.sspi.SSPIClient %persistence.quarkus.devservices.enabled=false %persistence.kie.flyway.enabled=true @@ -30,4 +31,4 @@ quarkus.native.native-image-xmx=8g %container.quarkus.container-image.push=false %container.quarkus.container-image.group=${USER} %container.quarkus.container-image.registry=dev.local -%container.quarkus.container-image.tag=1.0-SNAPSHOT \ No newline at end of file +%container.quarkus.container-image.tag=1.0-SNAPSHOT diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml index 56d8c803a8..48f7929f98 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/pom.xml @@ -194,6 +194,10 @@ io.quarkus quarkus-jdbc-postgresql + + io.quarkus + quarkus-flyway + io.quarkus quarkus-agroal diff --git a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties index 7a9f24ce65..922b84320b 100644 --- a/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-correlation-quarkus/src/main/resources/application.properties @@ -89,6 +89,8 @@ kogito.persistence.type=jdbc #run create tables scripts kie.flyway.enabled=true +quarkus.native.additional-build-args=--initialize-at-run-time=org.postgresql.sspi.SSPIClient + quarkus.datasource.db-kind=postgresql %prod.quarkus.datasource.username=postgres %prod.quarkus.datasource.password=postgres diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml index 052b1f5632..fd4f422603 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/pom.xml @@ -101,6 +101,10 @@ io.quarkus quarkus-jdbc-postgresql + + io.quarkus + quarkus-flyway + io.quarkus quarkus-agroal diff --git a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties index bdb9623e63..6265a66edf 100644 --- a/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties +++ b/serverless-workflow-examples/serverless-workflow-data-index-quarkus/src/main/resources/application.properties @@ -52,6 +52,8 @@ kie.flyway.enabled=true quarkus.kubernetes-client.devservices.enabled=false quarkus.native.native-image-xmx=8g +quarkus.native.additional-build-args=--initialize-at-run-time=org.postgresql.sspi.SSPIClient + # Security quarkus.oidc.enabled=false @@ -93,4 +95,4 @@ quarkus.oidc.enabled=false %http-events.mp.messaging.outgoing.kogito-processdefinitions-events.connector=quarkus-http %http-events.mp.messaging.outgoing.kogito-processdefinitions-events.topic=kogito-processdefinitions-events %http-events.mp.messaging.outgoing.kogito-processdefinitions-events.url=http://data-index:8180/definitions -%http-events.mp.messaging.outgoing.kogito-processdefinitions-events.method=POST \ No newline at end of file +%http-events.mp.messaging.outgoing.kogito-processdefinitions-events.method=POST