This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 66907864f809ee71af73fb99ae74ac3a14b70b85
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Fri Jan 7 09:51:40 2022 +0100

    chore(maven): Set Maven proxy ID in global settings
---
 pkg/util/maven/maven_proxies.go | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/pkg/util/maven/maven_proxies.go b/pkg/util/maven/maven_proxies.go
index abb8a91..94091a8 100644
--- a/pkg/util/maven/maven_proxies.go
+++ b/pkg/util/maven/maven_proxies.go
@@ -58,11 +58,15 @@ func parseProxyFromEnvVar(proxyEnvVar string) (Proxy, 
error) {
                Host:     u.Hostname(),
                Port:     u.Port(),
        }
-       if proxy.Port == "" {
-               switch proxy.Protocol {
-               case "http":
+       switch proxy.Protocol {
+       case "http":
+               proxy.ID = "http-proxy"
+               if proxy.Port == "" {
                        proxy.Port = "80"
-               case "https":
+               }
+       case "https":
+               proxy.ID = "https-proxy"
+               if proxy.Port == "" {
                        proxy.Port = "443"
                }
        }

Reply via email to