DEBUG_OPTIONS in aca_bootRun.sh sets debug options for bootRun or war

This commit is contained in:
iadgovuser29 2024-05-07 16:53:15 -04:00
parent 22b6faee44
commit 141f4236a8
3 changed files with 7 additions and 5 deletions

View File

@ -22,7 +22,7 @@ java {
bootRun {
if (project.hasProperty('debug')) {
jvmArgs "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9123"
jvmArgs project.debug
}
}

View File

@ -14,6 +14,7 @@ SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; )
LOG_FILE=/dev/null
GRADLE_WRAPPER="./gradlew"
DEPLOYED_WAR=false
DEBUG_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9123"
# Check for sudo or root user
if [ "$EUID" -ne 0 ]
@ -134,7 +135,7 @@ if [ -z "$USE_WAR" ]; then
echo "Booting the ACA from local build..."
if [ "$DEBUG_ACA" == YES ]; then
echo "... in debug"
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE" -Pdebug
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE" -Pdebug="$DEBUG_OPTIONS"
else
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE"
fi
@ -142,7 +143,7 @@ else
echo "Booting the ACA from a war file..."
if [ "$DEBUG_ACA" == YES ]; then
echo "... in debug"
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9123 -jar $WAR_PATH --spring.config.location=$SPRING_PROP_FILE &
java $DEBUG_OPTIONS -jar $WAR_PATH --spring.config.location=$SPRING_PROP_FILE &
else
java -jar $WAR_PATH --spring.config.location=$SPRING_PROP_FILE &
fi

View File

@ -10,6 +10,7 @@ $ACA_COMMON_SCRIPT=(Join-Path $APP_HOME 'aca_common.ps1')
$ALG="RSA" # or "ECC"
$GRADLE_WRAPPER='./gradlew'
$DEPLOYED_WAR=$null
$DEBUG_OPTIONS='-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9123'
# Load other scripts
. $ACA_COMMON_SCRIPT
@ -78,7 +79,7 @@ if ($w -or $war) {
echo "Booting the ACA from a war file..." | WriteAndLog
if ($d -or $debug) {
echo "... in debug"
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9123 -jar $DEPLOYED_WAR --spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES
java $DEBUG_OPTIONS -jar $DEPLOYED_WAR --spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES
} else {
java -jar $DEPLOYED_WAR --spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES
}
@ -86,7 +87,7 @@ if ($w -or $war) {
echo "Booting the ACA from local build..." | WriteAndLog
if ($d -or $debug) {
echo "... in debug"
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES" -Pdebug
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES" -Pdebug="$$DEBUG_OPTIONS"
} else {
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES"
}