From 5309238498e251fd2aa72219950bd03e201c11c4 Mon Sep 17 00:00:00 2001 From: Hongwei Date: Thu, 3 Sep 2026 08:40:33 +0200 Subject: [PATCH] build: use Scala 3 compatible lift persistence --- flushall_build_and_run.sh | 18 ++++++++++++++++-- flushall_fast_build_and_run.sh | 18 ++++++++++++++++-- obp-api/pom.xml | 16 ++++++++-------- obp-commons/pom.xml | 2 +- pom.xml | 4 ++-- run_tests_parallel.sh | 15 ++++++++++++++- 6 files changed, 57 insertions(+), 16 deletions(-) diff --git a/flushall_build_and_run.sh b/flushall_build_and_run.sh index ed932e3ae5..aefb27d700 100755 --- a/flushall_build_and_run.sh +++ b/flushall_build_and_run.sh @@ -181,7 +181,14 @@ if [ "$RUN_BACKGROUND" = true ]; then # via `out=$(./flushall_build_and_run.sh --background ...)` never sees EOF # — the substitution hangs forever, since the server (and thus the tee # process backing the substitution) never exits on its own. - nohup java $JAVA_OPTS -jar obp-api/target/obp-api.jar > "$RUNTIME_LOG" 2>&1 & + env \ + OBP_CONNECTOR="${OBP_CONNECTOR:-star}" \ + OBP_HOSTNAME="${OBP_HOSTNAME:-http://localhost:8080}" \ + OBP_STARCONNECTOR_SUPPORTED_TYPES="${OBP_STARCONNECTOR_SUPPORTED_TYPES:-mapped,internal,cardano_vJun2025}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADERS="${OBP_BERLIN_GROUP_MANDATORY_HEADERS:-}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT="${OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT:-}" \ + OBP_API_INSTANCE_ID="${OBP_API_INSTANCE_ID:-local}" \ + nohup java $JAVA_OPTS -jar obp-api/target/obp-api.jar > "$RUNTIME_LOG" 2>&1 & SERVER_PID=$! # Report the port the server will actually bind (dev.port in props), so callers # that capture this script's output (e.g. smoke_test.sh) can parse it out. @@ -199,5 +206,12 @@ else echo "Press Ctrl+C to stop the server" echo "Runtime log also written to: $RUNTIME_LOG" echo "" - java $JAVA_OPTS -jar obp-api/target/obp-api.jar 2>&1 | tee "$RUNTIME_LOG" + env \ + OBP_CONNECTOR="${OBP_CONNECTOR:-star}" \ + OBP_HOSTNAME="${OBP_HOSTNAME:-http://localhost:8080}" \ + OBP_STARCONNECTOR_SUPPORTED_TYPES="${OBP_STARCONNECTOR_SUPPORTED_TYPES:-mapped,internal,cardano_vJun2025}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADERS="${OBP_BERLIN_GROUP_MANDATORY_HEADERS:-}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT="${OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT:-}" \ + OBP_API_INSTANCE_ID="${OBP_API_INSTANCE_ID:-local}" \ + java $JAVA_OPTS -jar obp-api/target/obp-api.jar 2>&1 | tee "$RUNTIME_LOG" fi diff --git a/flushall_fast_build_and_run.sh b/flushall_fast_build_and_run.sh index 274d1c2013..1943c67d82 100755 --- a/flushall_fast_build_and_run.sh +++ b/flushall_fast_build_and_run.sh @@ -371,7 +371,14 @@ JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED \ if [ "$RUN_BACKGROUND" = true ]; then # Run in background with output to log file - nohup java $JAVA_OPTS -jar obp-api/target/obp-api.jar > http4s-server.log 2>&1 & + env \ + OBP_CONNECTOR="${OBP_CONNECTOR:-star}" \ + OBP_HOSTNAME="${OBP_HOSTNAME:-http://localhost:8080}" \ + OBP_STARCONNECTOR_SUPPORTED_TYPES="${OBP_STARCONNECTOR_SUPPORTED_TYPES:-mapped,internal,cardano_vJun2025}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADERS="${OBP_BERLIN_GROUP_MANDATORY_HEADERS:-}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT="${OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT:-}" \ + OBP_API_INSTANCE_ID="${OBP_API_INSTANCE_ID:-local}" \ + nohup java $JAVA_OPTS -jar obp-api/target/obp-api.jar > http4s-server.log 2>&1 & SERVER_PID=$! # Report the port the server will actually bind (dev.port in props), so callers # that capture this script's output (e.g. smoke_test.sh) can parse it out. @@ -387,7 +394,14 @@ else # Run in foreground (Ctrl+C to stop) echo "Press Ctrl+C to stop the server" echo "" - java $JAVA_OPTS -jar obp-api/target/obp-api.jar + env \ + OBP_CONNECTOR="${OBP_CONNECTOR:-star}" \ + OBP_HOSTNAME="${OBP_HOSTNAME:-http://localhost:8080}" \ + OBP_STARCONNECTOR_SUPPORTED_TYPES="${OBP_STARCONNECTOR_SUPPORTED_TYPES:-mapped,internal,cardano_vJun2025}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADERS="${OBP_BERLIN_GROUP_MANDATORY_HEADERS:-}" \ + OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT="${OBP_BERLIN_GROUP_MANDATORY_HEADER_CONSENT:-}" \ + OBP_API_INSTANCE_ID="${OBP_API_INSTANCE_ID:-local}" \ + java $JAVA_OPTS -jar obp-api/target/obp-api.jar fi ################################################################################ diff --git a/obp-api/pom.xml b/obp-api/pom.xml index 6c0811ab60..ff9e320503 100644 --- a/obp-api/pom.xml +++ b/obp-api/pom.xml @@ -29,13 +29,20 @@ 1.5.18 - com.github.OpenBankProject.lift-persistence + net.liftweb lift-persistence_${scala.version} org.json4s json4s-native_${scala.version} + + + org.scala-lang + scala-compiler + ${scala.compiler} + compile + org.slf4j log4j-over-slf4j @@ -198,13 +205,6 @@ elasticsearch-rest-client 8.19.12 - - - org.scala-lang - scala-compiler - ${scala.compiler} - compile - org.scala-lang scala-library diff --git a/obp-commons/pom.xml b/obp-commons/pom.xml index 0a916a82fa..f5d4a6ccb0 100644 --- a/obp-commons/pom.xml +++ b/obp-commons/pom.xml @@ -15,7 +15,7 @@ - com.github.OpenBankProject.lift-persistence + net.liftweb lift-persistence_${scala.version} diff --git a/pom.xml b/pom.xml index ff08870465..db45b34902 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ - v1.0.5 + 3.5.0-lift-persistence-dev-20260903 0.23.30 UTF-8 @@ -178,7 +178,7 @@ ${project.version} - com.github.OpenBankProject.lift-persistence + net.liftweb lift-persistence_${scala.version} ${lift.version} diff --git a/run_tests_parallel.sh b/run_tests_parallel.sh index b37ff9e29a..8e0e93982f 100755 --- a/run_tests_parallel.sh +++ b/run_tests_parallel.sh @@ -237,6 +237,19 @@ run_shard() { OBP_HOSTNAME="http://localhost:${port}" \ OBP_HTTP4S_TEST_PORT="${http4s_port}" \ OBP_MAIL_TEST_MODE="true" \ + OBP_ALLOW_SANDBOX_DATA_IMPORT="true" \ + OBP_TRANSACTIONREQUESTS_ENABLED="true" \ + OBP_ALLOW_PUBLIC_VIEWS="true" \ + OBP_CONSENTS_ALLOWED="true" \ + OBP_BERLIN_GROUP_V1_3_ALIAS_PATH="0.6/v1" \ + OBP_ALLOWED_INTERNAL_REDIRECT_URLS="/,/oauth/authorize" \ + OBP_RESETPASSWORDURLENABLED="true" \ + OBP_SIMPLE_OTP_INSTRUCTION_TRANSPORT="dummy" \ + OBP_ACCOUNT_OTP_INSTRUCTION_TRANSPORT="dummy" \ + OBP_SEPA_OTP_INSTRUCTION_TRANSPORT="dummy" \ + OBP_FREE_FORM_OTP_INSTRUCTION_TRANSPORT="dummy" \ + OBP_COUNTERPARTY_OTP_INSTRUCTION_TRANSPORT="dummy" \ + OBP_SEPA_CREDIT_TRANSFERS_OTP_INSTRUCTION_TRANSPORT="dummy" \ OBP_DYNAMIC_CODE_SANDBOX_PERMISSIONS='[new java.net.NetPermission("specifyStreamHandler"), new java.lang.reflect.ReflectPermission("suppressAccessChecks"), new java.lang.RuntimePermission("getenv.*"), new java.lang.RuntimePermission("accessDeclaredMembers"), new java.lang.RuntimePermission("getClassLoader")]' \ OBP_ALLOW_USER_GENERATED_SCALA_CODE="true" \ OBP_API_INSTANCE_ID="shard_${n}_${port}" \ @@ -579,4 +592,4 @@ else echo "FAIL" > test-results/parallel/RESULT fi -exit $OVERALL_RC \ No newline at end of file +exit $OVERALL_RC