Sets Java's web proxy properties, so that tasks and code run in the same JVM can have through-the-firewall access to remote web sites, and remote ftp sites. You can nominate an http and ftp proxy, or a socks server, reset the server settings, or do nothing at all.
<h3>Examples</h3>
<pre><setproxy/></pre> do nothing
<pre><setproxy proxyhost="firewall"/></pre> set the proxy to firewall:80
<pre><setproxy proxyhost="firewall" proxyport="81"/></pre> set the proxy to firewall:81
<pre><setproxy proxyhost=""/></pre> stop using the http proxy; don't change the socks settings
<pre><setproxy socksproxyhost="socksy"/></pre> use socks via socksy:1080
<pre><setproxy socksproxyhost=""/></pre> stop using the socks server.
<p>
You can set a username and password for http with the <tt>proxyHost</tt> and <tt>proxyPassword</tt> attributes. On Java1.4 and above these can also be used against SOCKS5 servers.
<br><font face="arial,helvetica,sanserif">Sets Java's web proxy properties, so that tasks and code run in the same JVM can have through-the-firewall access to remote web sites, and remote ftp sites.</font>
Sets Java's web proxy properties, so that tasks and code run in the same JVM can have through-the-firewall access to remote web sites, and remote ftp sites. You can nominate an http and ftp proxy, or a socks server, reset the server settings, or do nothing at all. <p> Examples <pre><setproxy/></pre> do nothing <pre><setproxy proxyhost="firewall"/></pre> set the proxy to firewall:80 <pre><setproxy proxyhost="firewall" proxyport="81"/></pre> set the proxy to firewall:81 <pre><setproxy proxyhost=""/></pre> stop using the http proxy; don't change the socks settings <pre><setproxy socksproxyhost="socksy"/></pre> use socks via socksy:1080 <pre><setproxy socksproxyhost=""/></pre> stop using the socks server. <p> You can set a username and password for http with the <tt>proxyHost</tt> and <tt>proxyPassword</tt> attributes. On Java1.4 and above these can also be used against SOCKS5 servers. </p>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">A list of hosts to bypass the proxy on. These should be separated with the vertical bar character '|'. Only in Java 1.4 does ftp use this list. e.g. fozbot.corp.sun.com|*.eng.sun.com</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">the HTTP/ftp proxy host. Set this to "" for the http proxy option to be disabled</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">set the proxy user. Probably requires a password to accompany this setting. Default=""</font>
<strong>Parameters as nested elements</strong></a></font>
</td></tr>
<tr><td><blockquote>
</blockquote></td></tr>
</table>
<!-- End Elements -->
<td valign="top" align="left">
nonproxyhosts
</td>
<td valign="top" align="left">
A list of hosts to bypass the proxy on. These should be separated with the vertical bar character '|'. Only in Java 1.4 does ftp use this list. e.g. fozbot.corp.sun.com|*.eng.sun.com
</td>
<td valign="top" align="left">
String
</td>
<td valign="top" align="left" rowspan="7">
Optional
</td>
</tr>
<tr>
<td valign="top" align="left">
proxyhost
</td>
<td valign="top" align="left">
the HTTP/ftp proxy host. Set this to "" for the http proxy option to be disabled
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
proxypassword
</td>
<td valign="top" align="left">
Set the password for the proxy. Used only if the proxyUser is set.
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
proxyport
</td>
<td valign="top" align="left">
the HTTP/ftp proxy port number; default is 80
</td>
<td valign="top" align="left">
int
</td>
</tr>
<tr>
<td valign="top" align="left">
proxyuser
</td>
<td valign="top" align="left">
set the proxy user. Probably requires a password to accompany this setting. Default=""
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
socksproxyhost
</td>
<td valign="top" align="left">
The name of a Socks server. Set to "" to turn socks proxying off.
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
socksproxyport
</td>
<td valign="top" align="left">
Set the ProxyPort for socks connections. The default value is 1080
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Build file name, to use in conjunction with directories.<br> Defaults to "build.xml".<br> If <code>genericantfile</code> is set, this attribute is ignored.</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Build file path, to use in conjunction with directories.<br> Use <code>genericantfile</code>, in order to run the same build file with different basedirs.<br> If this attribute is set, <code>antfile</code> is ignored.</font>
<strong>any filesystem based <a href="../Types/resources.html#collection">resource collection</a></strong></font>
</td></tr>
<tr><td><blockquote>
<h3 id="attributes">Parameters</h3>
<table>
<tr>
<td valign="top" align="left">
<b>Attribute</b>
</td>
<td valign="top" align="left">
<b>Description</b>
</td>
<td valign="top" align="left">
<b>Type</b>
</td>
<td valign="top" align="left">
<b>Requirement</b>
</td>
</tr>
<tr>
<td valign="top" align="left">
antfile
</td>
<td valign="top" align="left">
Build file name, to use in conjunction with directories.<br> Defaults to "build.xml".<br> If <code>genericantfile</code> is set, this attribute is ignored.
</td>
<td valign="top" align="left">
String
</td>
<td valign="top" align="left" rowspan="10">
Optional
</td>
</tr>
<tr>
<td valign="top" align="left">
buildpath
</td>
<td valign="top" align="left">
Set the buildpath to be used to find sub-projects.
</td>
<td valign="top" align="left">
Path
</td>
</tr>
<tr>
<td valign="top" align="left">
buildpathref
</td>
<td valign="top" align="left">
Buildpath to use, by reference.
</td>
<td valign="top" align="left">
Reference
</td>
</tr>
<tr>
<td valign="top" align="left">
failonerror
</td>
<td valign="top" align="left">
Sets whether to fail with a build exception on error, or go on.
</td>
<td valign="top" align="left">
boolean
</td>
</tr>
<tr>
<td valign="top" align="left">
genericantfile
</td>
<td valign="top" align="left">
Build file path, to use in conjunction with directories.<br> Use <code>genericantfile</code>, in order to run the same build file with different basedirs.<br> If this attribute is set, <code>antfile</code> is ignored.
</td>
<td valign="top" align="left">
File
</td>
</tr>
<tr>
<td valign="top" align="left">
inheritall
</td>
<td valign="top" align="left">
Corresponds to
<code><ant></code>'s
<code>inheritall</code> attribute but defaults
to false in this task..
</td>
<td valign="top" align="left">
boolean
</td>
</tr>
<tr>
<td valign="top" align="left">
inheritrefs
</td>
<td valign="top" align="left">
Corresponds to <code><ant></code>'s <code>inheritrefs</code> attribute.
</td>
<td valign="top" align="left">
boolean
</td>
</tr>
<tr>
<td valign="top" align="left">
output
</td>
<td valign="top" align="left">
Corresponds to <code><ant></code>'s <code>output</code> attribute.
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
target
</td>
<td valign="top" align="left"> </td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
verbose
</td>
<td valign="top" align="left">
Enable/ disable log messages showing when each sub-build path is entered/ exited.
The default value is false.
</td>
<td valign="top" align="left">
boolean
</td>
</tr>
</table>
<h3 id="elements">Parameters as nested elements</h3>
<h4>any filesystem based <a href="../Types/resources.html#collection">resource collection</a></h4>
This includes <code><fileset></code>,
<code><dirset></code> and <code><filelist></code>
which are the nested resource collections supported prior
Adds a directory set to the implicit build path. <p> <em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em>
Adds an ordered file list to the implicit build path. <p> <em>Note that contrary to file and directory sets, file lists can reference non-existent files or directories!</em>
Adds a file set to the implicit build path. <p> <em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em>
<em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em>
<em>Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!</em>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Sets the destination directory. If not set, the basedir directory is used instead.</font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Whether the temp file will be marked for deletion on normal exit of the Java Virtual Machine (even though the file may never be created); default <em>false</em>. <strong>Since Apache Ant 1.7</strong></font>
<font color="#000000" size="-1" face="arial,helvetica,sanserif">Whether the temp file should be created by this task; default <em>false</em>.<strong>Since Ant 1.8</strong></font>
<strong>Parameters as nested elements</strong></a></font>
</td></tr>
<tr><td><blockquote>
</blockquote></td></tr>
</table>
<!-- End Elements -->
<h3 id="attributes">Parameters</h3>
<table>
<tr>
<td valign="top" align="left">
<b>Attribute</b>
</td>
<td valign="top" align="left">
<b>Description</b>
</td>
<td valign="top" align="left">
<b>Type</b>
</td>
<td valign="top" align="left">
<b>Requirement</b>
</td>
</tr>
<tr>
<td valign="top" align="left">
property
</td>
<td valign="top" align="left">
Sets the property you wish to assign the temporary file to.
</td>
<td valign="top" align="left">
String
</td>
<td valign="top" align="left" rowspan="1">
Required
</td>
</tr>
<tr>
<td valign="top" align="left">
destdir
</td>
<td valign="top" align="left">
Sets the destination directory. If not set, the basedir directory is used instead.
</td>
<td valign="top" align="left">
File
</td>
<td valign="top" align="left" rowspan="5">
Optional
</td>
</tr>
<tr>
<td valign="top" align="left">
prefix
</td>
<td valign="top" align="left">
Sets the optional prefix string for the temp file.
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
suffix
</td>
<td valign="top" align="left">
Sets the optional suffix string for the temp file.
</td>
<td valign="top" align="left">
String
</td>
</tr>
<tr>
<td valign="top" align="left">
deleteonexit
</td>
<td valign="top" align="left">
Whether the temp file will be marked for deletion on normal exit of the Java Virtual Machine (even though the file may never be created); default <em>false</em>. <strong>Since Apache Ant 1.7</strong>
</td>
<td valign="top" align="left">
boolean
</td>
</tr>
<tr>
<td valign="top" align="left">
createfile
</td>
<td valign="top" align="left">
Whether the temp file should be created by this task; default <em>false</em>.<strong>Since Ant 1.8</strong>
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.