Setting the proxy in the Maven configs works:

```
proxy_config() {
     local protocol="$1"
     local proxy
     proxy=$(echo "$2" | sed 's@https\?://@@;s@/$@@')
     cat <<EOF
    <proxy>
      <id>${protocol}_proxy</id>
      <active>true</active>
      <protocol>${protocol}</protocol>
      <host>${proxy%:*}</host>
      <port>${proxy##*:}</port>
      <username></username>
      <password></password>
      <nonProxyHosts></nonProxyHosts>
    </proxy>
EOF
}

if test -n "${http_proxy-}${https_proxy-}"; then
     setting_conf="$home/.m2/settings.xml"
     mkdir -p "${setting_conf%/*}"
     {
          printf "<settings>\n  <proxies>\n"
          test -z "${http_proxy-}" || proxy_config http "${http_proxy}"
          test -z "${https_proxy-}" || proxy_config https "${https_proxy}"
          printf "  </proxies>\n</settings>\n"
     } >"$setting_conf"

     echo ">>>>>>>>>>>>>>>>>>>> .m2/settings.xml >>>>>>>>>>>>>>>>>>>>"
     cat "$setting_conf"
     echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
fi
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2115740

Title:
  source autopkgtest fails: I/O exception (java.net.SocketException)
  caught when processing request to {s}->https://repo1.maven.org:443:
  Network is unreachable

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tools-build-clojure/+bug/2115740/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to