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=32667>. 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=32667 Summary: setting proxypassword and proxyuser in setProxy task does not work Product: Ant Version: 1.6.2 Platform: All OS/Version: Linux Status: NEW Keywords: PatchAvailable Severity: major Priority: P2 Component: Optional Tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The setProxy task sets the properties "http.proxyUser" and "http.proxyPassword" in order to provide user and password for proxy authentication. With JDK 1.4.2_0x on Linux this does not work (I think this is also reported in Suns bug database. In JDK 1.3 it seems to work). The workaround with using the Authenticator class works on this platform. Following the javadoc, it should be usable since JDK 1.2. diff -rb ./src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java ../apache-ant-1.6.2/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java 25a26 > import java.net.*; 196a198,199 > Authenticator.setDefault( > new HttpAuthenticateProxy( proxyUser, proxyPassword )); 221a225,226 > Authenticator.setDefault( > new HttpAuthenticateProxy( proxyUser, proxyPassword )); 240a246,261 > public class HttpAuthenticateProxy extends Authenticator > { > String user, password; > > public HttpAuthenticateProxy( String user, String password ) > { > this.user = user; > this.password = password; > } > > protected PasswordAuthentication getPasswordAuthentication() > { > return new PasswordAuthentication( > user, password.toCharArray()); > } > } 246c267 < + (proxyHost != null ? proxyHost : "''") --- > + proxyUser + ":" + proxyPassword + "@" + (proxyHost != null ? proxyHost : "''") -- 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]
