flushall_build_and_run.sh

This commit is contained in:
simonredfern 2025-12-16 14:59:29 +01:00
parent 3e5663d42a
commit 77ecfc6c12

30
flushall_build_and_run.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
# Script to flush Redis, build the project, and run Jetty
#
# This script should be run from the OBP-API root directory:
# cd /path/to/OBP-API
# ./flushall_build_and_run.sh
set -e # Exit on error
echo "=========================================="
echo "Flushing Redis cache..."
echo "=========================================="
redis-cli <<EOF
flushall
exit
EOF
if [ $? -eq 0 ]; then
echo "Redis cache flushed successfully"
else
echo "Warning: Failed to flush Redis cache. Continuing anyway..."
fi
echo ""
echo "=========================================="
echo "Building and running with Maven..."
echo "=========================================="
export MAVEN_OPTS="-Xss128m"
mvn install -pl .,obp-commons && mvn jetty:run -pl obp-api