You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2008/11/01 14:32:15 UTC
svn commit: r709691 -
/maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
Author: vsiveton
Date: Sat Nov 1 06:32:15 2008
New Revision: 709691
URL: http://svn.apache.org/viewvc?rev=709691&view=rev
Log:
o added encoding support due to r709689
Modified:
maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
Modified: maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java?rev=709691&r1=709690&r2=709691&view=diff
==============================================================================
--- maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java (original)
+++ maven/plugins/trunk/maven-linkcheck-plugin/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java Sat Nov 1 06:32:15 2008
@@ -58,6 +58,7 @@
import org.apache.maven.settings.Settings;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.WriterFactory;
/**
* Generates a <code>Linkcheck</code> report.
@@ -256,6 +257,14 @@
*/
protected String[] excludedLinks;
+ /**
+ * Specifies the encoding to be used by Linkcheck. If <code>${project.reporting.outputEncoding}</code> is not
+ * specified, using UTF-8.
+ *
+ * @parameter expression="${encoding}" default-value="${project.reporting.outputEncoding}"
+ */
+ private String encoding;
+
// ----------------------------------------------------------------------
// Public methods
// ----------------------------------------------------------------------
@@ -409,6 +418,7 @@
lc.setExcludedPages( getExcludedPages() );
lc.setExcludedHttpStatusErrors( excludedHttpStatusErrors );
lc.setExcludedHttpStatusWarnings( excludedHttpStatusWarnings );
+ lc.setEncoding( ( StringUtils.isNotEmpty( encoding ) ? encoding : WriterFactory.UTF_8 ) );
HttpBean bean = new HttpBean();
bean.setMethod( httpMethod );