Issue #7008 - fix jetty.sh - avoid duplicates

+ Do not include JETTY_SYS_PROPS in JAVA_OPTIONS
  to avoid duplicates that show up in RUN_ARGS.
+ Only use JETTY_SYS_PROPS in RUN_CMD.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2021-10-18 09:51:17 -05:00
parent cdba235db6
commit c89866682c
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 3 additions and 3 deletions

View File

@ -414,7 +414,7 @@ TMPDIR="`cygpath -w $TMPDIR`"
;;
esac
JAVA_OPTIONS=(${JAVA_OPTIONS[*]} "-Djetty.home=$JETTY_HOME" "-Djetty.base=$JETTY_BASE" "-Djava.io.tmpdir=$TMPDIR")
JETTY_SYS_PROPS=$(echo -ne "-Djetty.home=$JETTY_HOME" "-Djetty.base=$JETTY_BASE" "-Djava.io.tmpdir=$TMPDIR")
#####################################################
# This is how the Jetty server will be started
@ -433,8 +433,8 @@ case "`uname`" in
CYGWIN*) JETTY_START="`cygpath -w $JETTY_START`";;
esac
RUN_ARGS=$(echo -ne $JAVA_OPTIONS ; "$JAVA" -jar "$JETTY_START" --dry-run=opts,path,main,args ${JETTY_ARGS[*]})
RUN_CMD=("$JAVA" ${RUN_ARGS[@]})
RUN_ARGS=$("$JAVA" -jar "$JETTY_START" --dry-run=opts,path,main,args ${JETTY_ARGS[*]})
RUN_CMD=("$JAVA" $JETTY_SYS_PROPS ${RUN_ARGS[@]})
#####################################################
# Comment these out after you're happy with what