Skip to content

Commit

Permalink
Issue #7008 - fix jetty.sh - avoid duplicates
Browse files Browse the repository at this point in the history
+ 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 <[email protected]>
  • Loading branch information
joakime committed Oct 18, 2021
1 parent cdba235 commit c898666
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jetty-home/src/main/resources/bin/jetty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c898666

Please sign in to comment.