Added debug mode if boot war is selected

This commit is contained in:
iadgovuser29 2024-05-07 16:23:26 -04:00
parent f476b25053
commit 22b6faee44
2 changed files with 28 additions and 15 deletions

View File

@ -130,16 +130,21 @@ WEB_TLS_PARAMS="--server.ssl.key-store-password=$hirs_pki_password \
# uncomment to show spring boot and hibernate properties used as gradle arguments
#echo "--args=\"$CONNECTOR_PARAMS $WEB_TLS_PARAMS\""
if [ "$DEBUG_ACA" == YES ]; then
echo "Booting with debug mode..."
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE" -Pdebug
elif [ -z "$USE_WAR" ]; then
if [ -z "$USE_WAR" ]; then
echo "Booting the ACA from local build..."
# ./gradlew bootRun --args="$CONNECTOR_PARAMS$WEB_TLS_PARAMS"
if [ "$DEBUG_ACA" == YES ]; then
echo "... in debug"
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE" -Pdebug
else
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE"
fi
else
echo "Booting the ACA from a war file..."
# java -jar $WAR_PATH $CONNECTOR_PARAMS$WEB_TLS_PARAMS &
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 &
else
java -jar $WAR_PATH --spring.config.location=$SPRING_PROP_FILE &
fi
exit 0
fi

View File

@ -74,13 +74,21 @@ if (!$DEPLOYED_WAR) {
}
$SPRING_PROP_FILE_FORWARDSLASHES=($global:HIRS_DATA_SPRING_PROP_FILE | ChangeBackslashToForwardSlash)
if ($d -or $debug) {
echo "Booting with debug mode..."
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE" -Pdebug
elseif ($w -or $war) {
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
} else {
java -jar $DEPLOYED_WAR --spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES
}
} else {
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
} else {
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES"
}
}