DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36174>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36174

           Summary: Consider enabling java.net.useSystemProxies by default
           Product: Ant
           Version: 1.6.2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: [EMAIL PROTECTED]


Today, to use Ant with a proxy, you either have to use <setproxy> task or use
the ANT_OPTS with a long sequence of system properties.

The former is horrible, because a proxy setting is by nature different from a
person to person. Doing this as a task requires you to either hard-code a proxy
name, or put the burden on the build script writer to externalize the property
definitions, and ask users to configure them individually.

ANT_OPTS is little better, but the proxy string is very lengthy.

In both cases, the user who wishs to move between different network environments
(such as between home and office) need to spend a lot of effort changing proxy
settings in many places.


This situation can be improved by using the system property
"java.net.useSystemProxies", a new addition in JDK 5.0.

When enabled, unless a proxy is configured specifically, URL class
will automatically consult the platform default proxy setting. On
Windows, this is a connection setting of IE, and on Unix this is
a setting of Gnome.

Unfortunately, this property is designed to read only once when
the proxy related code is initialized for the first time. So for
this to be usable, Ant has to set this property to true at the very
beginning, perhaps like this:

-----------------------------------
try {
    System.setProperty("java.net.useSystemProxies","true");
} catch (SecurityException e) {
    ; // failing to set this property isn't fatal
}
-----------------------------------

In earlier JVMs this takes no effect, which is a resonable behavior.

Please consider doing this in the future.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to