obe*_*ies 3 eclipse proxy eclipse-rcp equinox headless-rcp
我有一个脚本需要调用现有的无头Eclipse应用程序之一(例如:p2 director应用程序),它使用Proxy APIorg.eclipse.core.net
来配置其对HTTP服务器的请求.
在Linux上,我可以通过设置环境变量http_proxy
和来配置Eclipse Proxy API https_proxy
.
是否有类似的解决方案从Windows中的命令行配置代理?
我试图通过设置的Java(指定的HTTP代理配置属性http.proxyHost
,http.proxyPort
等等),但这不起作用.设置属性只会导致Eclipse的日志条目通知我系统属性被首选项中的值覆盖:
!ENTRY org.eclipse.core.net 1 0 2013-08-09 15:21:19.413
!MESSAGE System property http.proxyHost has been set to proxy by an external source. This value will be overwritten using the values from the preferences
!ENTRY org.eclipse.core.net 1 0 2013-08-09 15:21:19.414
!MESSAGE System property http.proxyPort has been set to 8080 by an external source. This value will be overwritten using the values from the preferences
Run Code Online (Sandbox Code Playgroud)
所以另一种选择是无头应用程序,它允许配置首选项.该应用程序是否存在(最好是标准Eclipse发行版的一部分)?
Eclipse应用程序的代理首选项存储在文件中
<eclipse-installation>/configuration/.settings/org.eclipse.core.net.prefs
Run Code Online (Sandbox Code Playgroud)
因此,要么通过Eclipse首选项UI(常规/网络连接)编辑设置,然后将该文件复制到无头应用程序,要么手动创建/编辑:
eclipse.preferences.version=1
nonProxiedHosts=localhost|127.0.0.1
org.eclipse.core.net.hasMigrated=true
proxiesEnabled=true
proxyData/HTTP/hasAuth=false
proxyData/HTTP/host=<proxy.your.org>
proxyData/HTTP/port=<port>
proxyData/HTTPS/hasAuth=false
proxyData/HTTPS/host=<proxy.your.org>
proxyData/HTTPS/port=<port>
# - Set SOCKS proxy only if neccessary -
# proxyData/SOCKS/hasAuth=false
# proxyData/SOCKS/host=<proxy.your.org>
# proxyData/SOCKS/port=<port>
systemProxiesEnabled=false
Run Code Online (Sandbox Code Playgroud)
HTH.
归档时间: |
|
查看次数: |
5937 次 |
最近记录: |