From 48f64719f0a550e7b9b2edffc44273246f30d3c7 Mon Sep 17 00:00:00 2001 From: Michael Ritter Date: Mon, 8 Sep 2025 16:44:49 -0600 Subject: [PATCH] DRYD-1892: JDBC Parameter Build Env Var (#475) * Read from JDBC_URL_PARAMS environment variable * Remove encoded url from build properties * Add script to encode url parameters * Encode jdbc params where needed * Remove unused configuration --- build.properties | 7 ++++--- build.xml | 14 ++++++++++++-- services/JaxRsServiceProvider/build.xml | 13 ++++++++----- .../src/test/resources/META-INF/persistence.xml | 7 ------- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/build.properties b/build.properties index 93874461f..ecce3d18a 100644 --- a/build.properties +++ b/build.properties @@ -198,10 +198,11 @@ db.jdbc.default.datasource=jdbc/default #db.jdbc.urloptions.encoded=ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory&foo=true # -# By default, as placeholders, we'll supply meaningless JDBC options -both encoded and non-encode forms. +# Use the JDBC_URL_OPTS env var to set the urloptions for the jdbc connection string +# The db.jdbc.urloptions.encoded needs to be created in each ant target which uses it by calling the +# urlencode scriptdef. We can still reference it below as it will be added at runtime. # -db.jdbc.urloptions=foo=true&bar=false -db.jdbc.urloptions.encoded=foo=true&bar=false +db.jdbc.urloptions=${env.JDBC_URL_OPTS} # # JDBC urls that CollectionSpace needs to talk to the "admin" database, Nuxeo databases, and the "cspace" database (i.e., the AuthN/AuthZ database) diff --git a/build.xml b/build.xml index c335011fb..3cd4c4f94 100644 --- a/build.xml +++ b/build.xml @@ -14,6 +14,15 @@ + + + + + @@ -215,10 +224,10 @@ + @@ -303,6 +312,7 @@ + diff --git a/services/JaxRsServiceProvider/build.xml b/services/JaxRsServiceProvider/build.xml index dcad21410..c03e19ce9 100644 --- a/services/JaxRsServiceProvider/build.xml +++ b/services/JaxRsServiceProvider/build.xml @@ -5,11 +5,12 @@ + - - + + @@ -52,10 +53,12 @@ + + @@ -150,15 +153,15 @@ - + diff --git a/services/account/client/src/test/resources/META-INF/persistence.xml b/services/account/client/src/test/resources/META-INF/persistence.xml index 875a72f9a..c2db6ee44 100644 --- a/services/account/client/src/test/resources/META-INF/persistence.xml +++ b/services/account/client/src/test/resources/META-INF/persistence.xml @@ -10,13 +10,6 @@ org.collectionspace.services.account.Status - - -- 2.47.3