From 76efd358863f8576f3e359d10c16dd12d18ea487 Mon Sep 17 00:00:00 2001 From: bwalding Date: Thu, 17 Apr 2003 13:07:03 +0000 Subject: [PATCH] Additional logging now visible. HostConfiguration object wasn't being set on the http client PR: MAVEN-402 git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113354 13f79535-47bb-0310-9956-ffa450edef68 --- .../linkcheck/validation/HTTPLinkValidator.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/linkcheck/src/main/org/apache/maven/linkcheck/validation/HTTPLinkValidator.java b/linkcheck/src/main/org/apache/maven/linkcheck/validation/HTTPLinkValidator.java index 5f263586..3ef58def 100644 --- a/linkcheck/src/main/org/apache/maven/linkcheck/validation/HTTPLinkValidator.java +++ b/linkcheck/src/main/org/apache/maven/linkcheck/validation/HTTPLinkValidator.java @@ -67,7 +67,7 @@ import org.apache.commons.logging.LogFactory; /** * Checks links which are normal URLs * @author Ben Walding - * @version $Id: HTTPLinkValidator.java,v 1.6 2003/03/10 14:20:21 bwalding Exp $ + * @version $Id: HTTPLinkValidator.java,v 1.7 2003/04/17 13:07:03 bwalding Exp $ */ public class HTTPLinkValidator implements LinkValidator { @@ -92,18 +92,18 @@ public class HTTPLinkValidator implements LinkValidator if (proxyHost == null) { proxy = false; - LOG.debug("Not using a proxy"); + System.out.println("maven-linkcheck-plugin: Not using a proxy"); } else { proxy = true; this.proxyHost = proxyHost; - this.proxyPass = proxyPass; - this.proxyUser = proxyUser; this.proxyPort = Integer.parseInt(proxyPort); - LOG.debug("Using Proxy Host:" + proxyHost); - LOG.debug("Using Proxy Port:" + proxyPort); - LOG.debug("Using Proxy User:" + proxyUser); + this.proxyUser = proxyUser; + this.proxyPass = proxyPass; + System.out.println("maven-linkcheck-plugin: Proxy Host:" + proxyHost); + System.out.println("maven-linkcheck-plugin: Proxy Port:" + proxyPort); + System.out.println("maven-linkcheck-plugin: Proxy User:" + proxyUser); } } @@ -125,13 +125,14 @@ public class HTTPLinkValidator implements LinkValidator hc.setProxy(proxyHost, proxyPort); } HttpState state = new HttpState(); - + if (proxyUser != null && proxyPass != null) { state.setProxyCredentials(null, new UsernamePasswordCredentials(proxyUser, proxyPass)); } GetMethod get = new GetMethod(link); + cl.setHostConfiguration(hc); cl.setState(state); get.setFollowRedirects(true);