Hi there,
the attached patch passes proxy settings to the javadoc commandline tool, which
will be called from the <javadoc> ant task.
Proxy settings are necessary if external javadoc resources should be linked
with the generated javadoc, and the host resides behind a firewall.
The proxy settings from the system properties must be explicitly passed to the
javadoc commandline tool, since the tool cannot be run inside the same jvm as
ant, and therefore a new jvm will be created for javadoc (refer to:
http://ant.apache.org/manual/index.html)
This issue is also discussed in bug# 29870, but only workarounds are proposed.
Hi hope this patch will be merged into the Ant source tree.
What do you think?
Cheers,
Thomas
-------------------------------------------
Thomas Kappen
Senior Consultant
TECON Terenci GmbH
Balcke-Dürr-Allee 9
40882 Ratingen, Germany
http://www.TECON.de
Mobile: +49 (0) 172 2986026
Phone: +49 (0) 2102 557 328
Fax: +49 (0) 2102 557 302
mailto: [EMAIL PROTECTED]
Sitz der Gesellschaft: Düsseldorf
Amtsgericht: Düsseldorf
Handelsregister: HRB 47376
Geschäftsführung: Masod Karimi, Dirk Schäfer
USt-ID-Nr.: DE190667510
Steuer-Nr.: 103/5700/0899
Der Inhalt dieser e-Mail ist ausschließlich für den bezeichneten Adressaten
bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser e-Mail oder dessen
Vertreter sein sollten, beachten Sie bitte, dass jede Form der
Veröffentlichung, Vervielfältigung oder Weitergabe des Inhalts dieser e-Mail
unzulässig ist. Wir bitten Sie sofort den Absender zu informieren und die
E-mail zu löschen.
The information contained in this e-mail is intended solely for the addressee.
Access to this e-mail by anyone else is unauthorized. If you are not the
intended recipient, any form of disclosure, reproduction, distribution or any
action taken or refrained from in reliance on it, is prohibited and may be
unlawful. Please notify the sender immediately and destroy this e-mail.
Index:
D:/java/thirdparty/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
===================================================================
--- D:/java/thirdparty/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
(revision 521804)
+++ D:/java/thirdparty/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
(working copy)
@@ -1752,6 +1752,56 @@
toExecute.createArgument().setPath(bcp);
}
+ // pass proxy settings to javadoc
+ String httpProxyHost = getProject().getProperty("http.proxyHost");
+ if (httpProxyHost != null) {
+ toExecute.createArgument().setValue("-J-Dhttp.proxyHost=" +
httpProxyHost);
+ }
+ String httpProxyPort = getProject().getProperty("http.proxyPort");
+ if (httpProxyPort != null) {
+ toExecute.createArgument().setValue("-J-Dhttp.proxyPort=" +
httpProxyPort);
+ }
+ String httpsProxyHost = getProject().getProperty("https.proxyHost");
+ if (httpsProxyHost != null) {
+ toExecute.createArgument().setValue("-J-Dhttps.proxyHost=" +
httpsProxyHost);
+ }
+ String httpsProxyPort = getProject().getProperty("https.proxyPort");
+ if (httpsProxyPort != null) {
+ toExecute.createArgument().setValue("-J-Dhttps.proxyPort=" +
httpsProxyPort);
+ }
+ String httpNonProxyHosts =
getProject().getProperty("http.nonProxyHosts");
+ if (httpNonProxyHosts != null) {
+ toExecute.createArgument().setValue("-J-Dhttp.nonProxyHosts=" +
httpNonProxyHosts);
+ }
+ String httpProxyUser = getProject().getProperty("http.proxyHost");
+ if (httpProxyUser != null) {
+ toExecute.createArgument().setValue("-J-Dhttp.proxyUser=" +
httpProxyUser);
+ }
+ String httpProxyPassword = getProject().getProperty("http.proxyHost");
+ if (httpProxyPassword != null) {
+ toExecute.createArgument().setValue("-J-Dhttp.proxyPassword=" +
httpProxyPassword);
+ }
+ String socksProxyHost = getProject().getProperty("socksProxyHost");
+ if (socksProxyHost != null) {
+ toExecute.createArgument().setValue("-J-DsocksProxyHost=" +
socksProxyHost);
+ }
+ String socksProxyPort = getProject().getProperty("socksProxyPort");
+ if (socksProxyPort != null) {
+ toExecute.createArgument().setValue("-J-DsocksProxyPort=" +
socksProxyPort);
+ }
+ String socksUsername =
getProject().getProperty("java.net.socks.username");
+ if (socksUsername != null) {
+ toExecute.createArgument().setValue("-J-Djava.net.socks.username="
+ socksUsername);
+ }
+ String socksPassword =
getProject().getProperty("java.net.socks.password");
+ if (socksPassword != null) {
+ toExecute.createArgument().setValue("-J-Djava.net.socks.password="
+ socksPassword);
+ }
+ String useSystemProxies =
getProject().getProperty("java.net.useSystemProxies");
+ if (useSystemProxies != null) {
+
toExecute.createArgument().setValue("-J-Djava.net.useSystemProxies=" +
useSystemProxies);
+ }
+
// add the links arguments
if (links.size() != 0) {
for (Enumeration e = links.elements(); e.hasMoreElements();) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]