Skip to content

Commit

Permalink
[FAB-5179] Fix proxy auth for javaenv build
Browse files Browse the repository at this point in the history
Proxy authentication for javaenv build does not work due to the wrong
name of the parameter. This patch fixes it.

Change-Id: Ie75a46333f7565c5b7ee61951fe3149f4898f42c
Signed-off-by: Jun Nemoto <jun.nemoto.ff@hitachi.com>
  • Loading branch information
Jun Nemoto committed Jul 5, 2017
1 parent 6c3cb99 commit a18f02c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/chaincode/shim/java/javabuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ pattern='(https?://)?((([^:\/]+)(:([^\/]*))?@)?([^:\/?]+)(:([0-9]+))?)'
if [ -n "$HTTPPROXY" ]; then
if [[ "$HTTPPROXY" =~ $pattern ]]; then
[ -n "${BASH_REMATCH[4]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyUser=${BASH_REMATCH[4]}"
[ -n "${BASH_REMATCH[6]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyPass=${BASH_REMATCH[6]}"
[ -n "${BASH_REMATCH[6]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyPassword=${BASH_REMATCH[6]}"
[ -n "${BASH_REMATCH[7]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyHost=${BASH_REMATCH[7]}"
[ -n "${BASH_REMATCH[9]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttp.proxyPort=${BASH_REMATCH[9]}"
fi
fi
if [ -n "$HTTPSPROXY" ]; then
if [[ "$HTTPSPROXY" =~ $pattern ]]; then
[ -n "${BASH_REMATCH[4]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyUser=${BASH_REMATCH[4]}"
[ -n "${BASH_REMATCH[6]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyPass=${BASH_REMATCH[6]}"
[ -n "${BASH_REMATCH[6]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyPassword=${BASH_REMATCH[6]}"
[ -n "${BASH_REMATCH[7]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyHost=${BASH_REMATCH[7]}"
[ -n "${BASH_REMATCH[9]}" ] && JAVA_OPTS="$JAVA_OPTS -Dhttps.proxyPort=${BASH_REMATCH[9]}"
fi
Expand Down

0 comments on commit a18f02c

Please sign in to comment.