Skip to content

Commit

Permalink
Add no_proxy to proxy envs Fixes #1172
Browse files Browse the repository at this point in the history
  • Loading branch information
tkalmar committed Feb 9, 2025
1 parent b7b060f commit 714045e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.eirslett.maven.plugins.frontend.lib;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -53,6 +54,11 @@ private static Map<String, String> buildProxy(ProxyConfig proxyConfig, String np

proxyEnvironmentVariables.put("https_proxy", proxy.getUri().toString());
proxyEnvironmentVariables.put("http_proxy", proxy.getUri().toString());
final String nonProxyHosts = proxy.getNonProxyHosts();
if (nonProxyHosts != null && !nonProxyHosts.isEmpty()) {
proxyEnvironmentVariables.put("no_proxy", nonProxyHosts.replaceAll("\\|",",").replaceAll("\\*",""));

}
}

return proxyEnvironmentVariables;
Expand Down

0 comments on commit 714045e

Please sign in to comment.