public class MavenProxySupport extends Object
ProxySelectorAPI, then reads the current Maven settings using
EmbedderFactory.getProjectEmbedder(). If the maven settings do not contain proper proxy setup, maven options (
BeanRunConfigwill be instructed to use it
settings.xml.oldor a numbered
settings.xml.old.N, first unused N is selected. If the settings file contins the proxy in effect, but not active, the
activeproperty of that proxy will be set to true, and the others to false. Otherwise a new proxy entry with the desired proxy host/port is created. To disable proxies, all
activeentries are set to false.
MavenProxySupport.ProxyResult.configure(org.netbeans.modules.maven.execute.BeanRunConfig) should be run before each maven online invocation to potentially replace the global settings file with a customized one,
that specifies the correct proxy.
When creating customized settings.xml files, the files are named like
settings-[hashcode of the oroginal]-[sanitized proxy host].xml. If the settings.xml file does not exist at all, "new" is used
instead of the hashcode. Proxy host sanitization just replaces weird characters by "_".
|Modifier and Type||Class and Description|
|Constructor and Description|
|Modifier and Type||Method and Description|
public MavenProxySupport(Project project)
public CompletableFuture<MavenProxySupport.ProxyResult> checkProxySettings()