Author: stevel Date: Mon Dec 11 14:25:29 2006 New Revision: 485920 URL: http://svn.apache.org/viewvc?view=rev&rev=485920 Log: automatic proxy handling is only there if -autoproxy is set; marked as such in the docs. -noproxy is removed.
Modified: ant/core/trunk/WHATSNEW ant/core/trunk/docs/manual/proxy.html ant/core/trunk/docs/manual/running.html ant/core/trunk/src/main/org/apache/tools/ant/Main.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?view=diff&rev=485920&r1=485919&r2=485920 ============================================================================== --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Mon Dec 11 14:25:29 2006 @@ -9,6 +9,9 @@ not available, or if explicitly requested by using a "manager" attribute. +* The -noproxy option which was in the previous 1.7 alpha and beta + releases has been removed. It is the default behavior and not needed. + Fixed bugs: ----------- * Directory deletion did not work properly. @@ -63,7 +66,12 @@ EnumeratedAttribute. Bugzilla 41058. * Create a pom file for ant-testutil and add ant-testutil.jar to the ant - distribution. Bugzilla 40980. + distribution. Bugzilla 40980. + +* Roll back automatic proxy enabling on Java 1.5. It broke things like + Oracle JDBC drivers, and Ant itself on IBM's JVM on AIX, and didnt + seem to work to well the rest of the time. + To enable the feature, use the -autoproxy command line option. Changes from Ant 1.7.0Beta3 to Ant 1.7.0RC1 =========================================== Modified: ant/core/trunk/docs/manual/proxy.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/proxy.html?view=diff&rev=485920&r1=485919&r2=485920 ============================================================================== --- ant/core/trunk/docs/manual/proxy.html (original) +++ ant/core/trunk/docs/manual/proxy.html Mon Dec 11 14:25:29 2006 @@ -26,6 +26,11 @@ <h2>Proxy Configuration</h2> <p> +This page discussing proxy issues on command-line ant. +Consult your IDE documentation for IDE-specific information upon proxy setup. +</p> + +<p> All tasks running in Ant's JVM share the same HTTP/FTP/Socks proxy configuration. @@ -44,42 +49,29 @@ does not work behind the firewall. </p> <p> - This is a longstanding problem with Java and Ant, which Java1.5 finally - addresses. When Ant is run under Java1.5, it automatically sets the - <code>java.net.useSystemProxies</code> system property, telling the JVM to - switch to the OS-configured proxy settings.This is automatic, but it can be disabled. -</p> -<p> - When running Ant on older JVMs, this property is ignored. There are two other - ways to configure Ant's proxy settings in these cases. + This is a long standing problem with Java and Ant. The only way to fix + it is to explictly configure Ant with the proxy settings, either + by passing down the proxy details as JVM properties, or to + tell Ant on a Java1.5+ system to have the JVM work it out for itself. + </p> -<h3>Java1.5 automatic proxy support (new for Ant1.7)</h3> +<h3>Java1.5+ proxy support (new for Ant1.7)</h3> <p> - When Ant starts up, it automatically sets the + When Ant starts up, if the <code>-autoproxy</code> + command is supplied, Ant sets the <code>java.net.useSystemProxies</code> system property. This tells a Java1.5+ JVM to use the current set of property settings of the host environment. Other JVMs, such as the Kaffe and Apache Harmony runtimes, - may also use this property in future, which is why Ant always sets the - property -it is ignored on the Java1.4 and earlier runtimes. + may also use this property in future. + It is ignored on the Java1.4 and earlier runtimes. </p> <p> - This property should be enough to automatically give Ant hosted - builds network access. It may also work under an IDE, though that depends - upon the IDE and how it starts ant. If it bypasses Ant's Main entry point, - the proxy setup may be skipped, and if networking has already started up - by the time ant is run, the option may be ignored. Consult your IDE - documentation for IDE-specific information upon proxy setup. -</p> -<p> - To disable this automatic feature, set the command line option - <tt>-noproxy</tt>, or set a JVM or Ant property - <code>java.net.useSystemProxies</code> to a value other than - <code>true</code> or <code>on</code>. If the JVM option is already set, - Ant will not touch it; if an Ant property of that name is set, Ant will - pass the value of that property down to the JVM. + This property maybe enough to give command-line Ant + builds network access, although in practise the results + are somewhat disappointing. </p> <p> We are not entirely sure where it reads the property settings from. @@ -87,14 +79,22 @@ Unix/Linux it may use the current Gnome2 settings. <p> - The biggest limitation of this feature, other than requiring a 1.5+ JVM, + One limitation of this feature, other than requiring a 1.5+ JVM, is that it is not dynamic. A long-lasting build hosted on a laptop will - not adapt to changes in proxy settings. Furthermore, unless the user - is running <a - href="http://www.hpl.hp.com/techreports/2001/HPL-2001-158.html">an adaptive - laptop</a>, the host's proxy settings will not-automatically adapt to - changes in network context. The <code>-noproxy</code> option may be a useful - one to use when roaming. + not adapt to changes in proxy settings. +</p> + + +<p> + It is has also been reported a breaking the IBM Java 5 JRE on AIX, + and does not appear to work reliably on Linux. + Other odd things can go wrong, like Oracle JDBC drivers or pure Java SVN clients. +</p> + +<p> + To make the <code>-autproxy</code> option the default, add it to the environment variable + <code>ANT_ARGS</code>, which contains a list of arguments to pass to Ant on every + command line run. </p> <h3>JVM options</h3> @@ -132,11 +132,6 @@ <li>Does not work under IDEs. These need their own proxy settings changed</li> <li>Not dynamic enough to deal with laptop configuration changes.</li> </ol> -<p> - If you are using Ant on a pre-Java1.5 machine behind a firewall, this is - the simplest and best way to configure your runtime to work with build files - that go beyond the firewall. -</p> <h3>SetProxy Task</h3> <p> @@ -184,18 +179,11 @@ There are three ways to set up proxies in Ant. </p> <ol> -<li>Automatically, with Ant1.7 -use <code>-noproxy</code> to disable this.</li> +<li>With Ant1.7 using the <code>-autoproxy</code> parameter.</li> <li>Via JVM system properties -set these in the ANT_ARGS environment variable.</li> <li>Via the <setproxy> task.</li> </ol> -<p> -As Java1.5 adoption increases, automatic proxy support should become more -widespread. For this reason, we would encourage users not to try and -second-guess network configurations with setproxy, and instead to encourage -users to move up to Ant1.7/Java1.5, and if they cannot, to set proxy options -in the ANT_ARGS environment variable. -</p> <h4>Further reading</h4> Modified: ant/core/trunk/docs/manual/running.html URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/running.html?view=diff&rev=485920&r1=485919&r2=485920 ============================================================================== --- ant/core/trunk/docs/manual/running.html (original) +++ ant/core/trunk/docs/manual/running.html Mon Dec 11 14:25:29 2006 @@ -127,7 +127,7 @@ 1 (lowest) to 10 (highest); 5 is the default -nouserlib Run ant without using the jar files from ${user.home}/.ant/lib -noclasspath Run ant without using CLASSPATH - -noproxy Java 1.5 only: do not use the OS proxies + -autoproxy Java 1.5+ : use the OS proxies -main <class> override Ant's normal entry point </pre> <p>For more information about <code>-logger</code> and Modified: ant/core/trunk/src/main/org/apache/tools/ant/Main.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Main.java?view=diff&rev=485920&r1=485919&r2=485920 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/Main.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/Main.java Mon Dec 11 14:25:29 2006 @@ -125,9 +125,9 @@ private Integer threadPriority = null; /** - * proxy flag: default is true + * proxy flag: default is false */ - private boolean proxy = true; + private boolean proxy = false; /** * Prints the message of the Throwable if it (the message) is not @@ -452,7 +452,7 @@ + "\nThis can be caused by a version mismatch between " + "the ant script/.bat file and Ant itself."; throw new BuildException(msg); - } else if (arg.equals("-noproxy")) { + } else if (arg.equals("-autoproxy")) { proxy = false; } else if (arg.startsWith("-")) { // we don't have any more args to recognize! @@ -847,8 +847,8 @@ msg.append(" -nouserlib Run ant without using the jar files from" + lSep + " ${user.home}/.ant/lib" + lSep); msg.append(" -noclasspath Run ant without using CLASSPATH" + lSep); - msg.append(" -noproxy Java 1.5 only: do not use the OS proxies" - + lSep); + msg.append(" -autoproxy Java1.5+: use the OS proxy settings" + + lSep); msg.append(" -main <class> override Ant's normal entry point"); System.out.println(msg.toString()); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]