users@glassfish.java.net

Re: Updatetool question

From: Romain Grecourt <romain.grecourt_at_oracle.com>
Date: Thu, 03 Apr 2014 14:40:35 +0200

On 4/3/14 2:22 PM, Gustavo Kataoka wrote:
> Hi
>
> I'm trying to learn java ee, but I'm having problems to run the
> updatetool of glassfish on linux.
> It appears a message that says: "reading time out".
> I'm not an expert en bash, but checking the code of updatetool, when
> it asks if it have to use the system proxy, the correct code would be?:
>
> if [ ! -z "$http_proxy" ]; then
> echo "proxy.use.system=true" >> "$BOOTSTRAPPROPS"
> fi
>
> Instead of:
>
> if [ -z "$http_proxy" ]; then
> echo "proxy.use.system=true" >> "$BOOTSTRAPPROPS"
> fi
>
> Because -z asks if the value is empty or null, so if NOT empty the
> proxy must be used.?
If the user's environment has http_proxy defined, it would be used.
Otherwise, if $http_proxy is empty or null, use the system wide proxy
settings.

     if [ ! -z "$http_proxy" ]; then
         echo "proxy.URL=$http_proxy" >> "$BOOTSTRAPPROPS"
     fi

     if [ ! -z "$https_proxy" ]; then
         echo "proxy.secure.URL=$https_proxy" >> "$BOOTSTRAPPROPS"
     fi

     if [ -z "$http_proxy" ]; then
         echo "proxy.use.system=true" >> "$BOOTSTRAPPROPS"
     fi

Thanks,
Romain
> --
> Gustavo Kataoka