Skip to content

Configuring Proxies

Alexey Valikov edited this page Jan 16, 2016 · 3 revisions

Configuring proxies

If you need to compile remote resources and have to use proxies to access them, use the following configuration parameters:

  • useActiveProxyAsHttpproxy - if set to true, passes Maven's active proxy settings to XJC. Default value is false. Proxy settings are passed using the -httpproxy argument in the form [user[:password]@]proxyHost[:proxyPort]. This sets both HTTP as well as HTTPS proxy. See the following guide on proxy configuration.
  • proxyHost - sets the custom proxy host.
  • proxyPort - sets the custom proxy port.
  • proxyUsername - sets the custom proxy username.
  • proxyPassword - sets the custom proxy password.

If you configure both useActiveProxyAsHttpproxy as well as custom proxy* parameters, custom proxy will be preferred.

However, it is generally not recommended to compile remote resources. This may produce all kinds of problems which could make you build unstable. From remote server going down to firewalls you can't overcome.

Instead of accessing remote resources directly, make local copies and use catalogs to rewrite remote URLs into local URLs.

So if you think you need to configure a proxy, you might be on a dangerous path.

Clone this wiki locally