[
https://issues.apache.org/jira/browse/IVY-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089499#comment-13089499
]
Nicolas Lalevée commented on IVY-1031:
--------------------------------------
I've look into your patch and there's an issue. Ivy is still maintained
backward compatible with Java 1.4 and your code is using class which are
available only in Java 5 and later: namely Proxy and ProxySelector.
And about performance, actually this is one strength of both Ant and Ivy. We
should be careful about not wasting resources, especially when networking is
involved.
May I suggest another implementation. HttpClient is not supporting
'http.nonProxyHosts' but I think we can make HttpClientHandler do. Just make
Ivy instanciate two HttpClient instances, both based on the same
ConnectionManager. One will be configured with a proxy, one without. And make
the method getClient(URL url) choose between the 2 clients dependeing of the
host of the url, and the value of the System property 'http.nonProxyHosts'.
Would that makes sense ?
Another notes about your patch:
- prefer using Ivy's logging system rather than java.util.logging
- don't hesitate to correctly format the code, even if you don't need to
actually modify it. You removed a if, every code inside should be deindented
- it seems your working on code which is outdated compared to the current
trunk. You should probably work with the svn:
https://svn.apache.org/repos/asf/ant/ivy/core/trunk/
> Support for Web Proxy exclusions
> --------------------------------
>
> Key: IVY-1031
> URL: https://issues.apache.org/jira/browse/IVY-1031
> Project: Ivy
> Issue Type: New Feature
> Components: Core
> Affects Versions: 2.0
> Environment: N/A
> Reporter: Adam krieg
> Priority: Minor
> Attachments: httpclient-useproxyselector.patch,
> httpclient-useproxyselector.patch
>
>
> In my corporate environment, we have our own repository with most of our
> artifacts. However there are some artifacts we retrieve from external
> sources. To access those sources, we need to go through a web proxy.
> However if we set the web proxy settings, we are unable to resolve the
> internal artifacts.
> It would be nice to have Ivy be able to use the proxy for certain domains (or
> all domains by default) with an exclusion, like *.mycompany.com. Eclipse
> does something similar to this.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira