mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-29 17:28:57 +00:00
Added debug flag to aca_bootRun.sh options. JVM will launch with debug
This commit is contained in:
parent
a903b0e448
commit
f476b25053
@ -20,6 +20,12 @@ java {
|
||||
}
|
||||
}
|
||||
|
||||
bootRun {
|
||||
if (project.hasProperty('debug')) {
|
||||
jvmArgs "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:9123"
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
compileOnly {
|
||||
extendsFrom annotationProcessor
|
||||
|
@ -27,6 +27,7 @@ help () {
|
||||
echo " options:"
|
||||
echo " -p | --path Path to the HIRS_AttestationCAPortal.war file"
|
||||
echo " -w | --war Use deployed war file"
|
||||
echo " -d | --debug Launch the JVM with a debug port open"
|
||||
echo " -h | --help Print this help"
|
||||
echo
|
||||
}
|
||||
@ -49,6 +50,10 @@ while [[ $# -gt 0 ]]; do
|
||||
WAR_PATH="/opt/hirs/aca/HIRS_AttestationCAPortal.war"
|
||||
DEPLOYED_WAR=true
|
||||
;;
|
||||
-d|--debug)
|
||||
DEBUG_ACA=YES
|
||||
shift
|
||||
;;
|
||||
-h|--help)
|
||||
help
|
||||
exit 0
|
||||
@ -125,7 +130,10 @@ 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 [ -z "$USE_WAR" ]; then
|
||||
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
|
||||
echo "Booting the ACA from local build..."
|
||||
# ./gradlew bootRun --args="$CONNECTOR_PARAMS$WEB_TLS_PARAMS"
|
||||
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE"
|
||||
|
@ -1,6 +1,7 @@
|
||||
param (
|
||||
[string]$p, [string]$path = $null,
|
||||
[switch]$w, [switch]$war = $false,
|
||||
[switch]$d, [switch]$debug = $false,
|
||||
[switch]$h, [switch]$help = $false
|
||||
)
|
||||
|
||||
@ -34,6 +35,7 @@ if ($p) {
|
||||
$path = $p
|
||||
}
|
||||
$war = $w -or $war
|
||||
$debug = $d -or $debug
|
||||
$help = $h -or $help
|
||||
|
||||
if(!(New-Object Security.Principal.WindowsPrincipal(
|
||||
@ -49,6 +51,7 @@ if ($help) {
|
||||
echo " options:"
|
||||
echo " -p | --path Path to the HIRS_AttestationCAPortal.war file"
|
||||
echo " -w | --war Use deployed war file"
|
||||
echo " -d | --debug Launch the JVM with a debug port open"
|
||||
echo " -h | --help Print this help"
|
||||
exit 1
|
||||
}
|
||||
@ -71,7 +74,10 @@ if (!$DEPLOYED_WAR) {
|
||||
}
|
||||
|
||||
$SPRING_PROP_FILE_FORWARDSLASHES=($global:HIRS_DATA_SPRING_PROP_FILE | ChangeBackslashToForwardSlash)
|
||||
if ($w -or $war) {
|
||||
if ($d -or $debug) {
|
||||
echo "Booting with debug mode..."
|
||||
./gradlew bootRun --args="--spring.config.location=$SPRING_PROP_FILE" -Pdebug
|
||||
elseif ($w -or $war) {
|
||||
echo "Booting the ACA from a war file..." | WriteAndLog
|
||||
java -jar $DEPLOYED_WAR --spring.config.location=$SPRING_PROP_FILE_FORWARDSLASHES
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user