o MAVEN-313: Less debugging info shown to console (check maven.log), more link types checked (img, link, script)
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -56,15 +56,19 @@ package org.apache.maven.linkcheck;
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.maven.linkcheck.validation.LinkValidationItem;
|
||||
import org.apache.maven.linkcheck.validation.LinkValidationResult;
|
||||
import org.apache.maven.linkcheck.validation.LinkValidatorManager;
|
||||
@@ -75,11 +79,15 @@ import org.w3c.tidy.Tidy;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:bwalding@apache.org">Ben Walding</a>
|
||||
* @version $Id: FileToCheck.java,v 1.8 2003/03/07 21:44:45 bwalding Exp $
|
||||
* @version $Id: FileToCheck.java,v 1.9 2003/03/07 22:09:56 bwalding Exp $
|
||||
*
|
||||
*/
|
||||
public class FileToCheck
|
||||
{
|
||||
/**
|
||||
* Log for debug output
|
||||
*/
|
||||
private static Log LOG = LogFactory.getLog(FileToCheck.class);
|
||||
|
||||
private File base;
|
||||
private File fileToCheck;
|
||||
@@ -120,6 +128,9 @@ public class FileToCheck
|
||||
tidy.setXmlOut(true);
|
||||
tidy.setQuiet(true);
|
||||
tidy.setShowWarnings(false);
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PrintWriter errOut = new PrintWriter(baos);
|
||||
tidy.setErrout(errOut);
|
||||
|
||||
tidy.setXHTML(true);
|
||||
org.w3c.dom.Document domDocument = tidy.parseDOM(in, null);
|
||||
@@ -128,7 +139,8 @@ public class FileToCheck
|
||||
// JTidy's W3C DOM object
|
||||
DOMReader domReader = new DOMReader();
|
||||
doc = domReader.read(domDocument);
|
||||
|
||||
|
||||
LOG.debug(baos.toString());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user