dev@jaxb.java.net

Re: Make 'Options.ProxyHost' and 'Options.ProxyPort' fields public.

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 15 Jun 2006 09:18:28 -0700

Kostis Anagnostopoulos wrote:
> Hi to all JAXB1 developers,
>
> As you may have read, i'm making the JAXB1 maven2 plugin and i have
> come to a minor problem:
>
> On the com.sun.tools.xjc.Options class, the proxyHost and proxyPort
> fields have package level visibility.
>
> Should they be 'public' visible?
>
> All the rest fields are publicly available. In order to set values
> for those two fields, the parseArguments method is required. Why
> does this happen?

The way the proxy setting takes effect is by setting system properties:

> System.setProperty("http.proxyHost", proxyHost);
> System.setProperty("http.proxyPort", proxyPort);
> System.setProperty("https.proxyHost", proxyHost);
> System.setProperty("https.proxyPort", proxyPort);

In Maven, you should let Maven set proxy (from ~/.m2/settings.xml), and
therefore I don't think your plugin want to modify it.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com