diff --git a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
index 9c928f0bde..bbbcea7eb6 100644
--- a/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
+++ b/maven-reporting/maven-reporting-impl/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
@@ -189,10 +189,29 @@ public abstract class AbstractMavenReportRenderer
* @see #linkPatternedText(String)
*/
protected void tableCell( String text )
+ {
+ tableCell( text, false );
+ }
+
+ /**
+ * Add a cell in a table.
+ *
If asHtml
is true, add the text as Html
+ *
+ * @param text
+ * @param asHtml
+ */
+ protected void tableCell( String text, boolean asHtml )
{
sink.tableCell();
- linkPatternedText( text );
+ if ( asHtml )
+ {
+ sink.rawText( text );
+ }
+ else
+ {
+ linkPatternedText( text );
+ }
sink.tableCell_();
}
@@ -224,7 +243,9 @@ public abstract class AbstractMavenReportRenderer
protected void tableCaption( String caption )
{
sink.tableCaption();
+
text( caption );
+
sink.tableCaption_();
}
@@ -422,7 +443,8 @@ public abstract class AbstractMavenReportRenderer
/**
* Return a valid href.
- * A valid href could start by mailto:
.
+ * A valid href could start by mailto:
.
+ * For a relative path, the href should start by ./
to be valid.
*
* @param href an href
* @return a valid href or null if the href is not valid.
@@ -451,7 +473,7 @@ public abstract class AbstractMavenReportRenderer
// TODO Waiting for new release of Validator
// http://issues.apache.org/bugzilla/show_bug.cgi?id=30686
String hrefTmp;
- if ( !href.trim().endsWith( "/" ) )
+ if ( !href.endsWith( "/" ) )
{
hrefTmp = href + "/index.html";
}
@@ -465,6 +487,18 @@ public abstract class AbstractMavenReportRenderer
return href;
}
+ if ( href.startsWith( "./" ) )
+ {
+ if ( href.length() > 2 )
+ {
+ return href.substring(2, href.length() );
+ }
+ else
+ {
+ return ".";
+ }
+ }
+
return null;
}
}
@@ -484,7 +518,7 @@ public abstract class AbstractMavenReportRenderer
}
// Map defined by key/value name/href
- // If href == null, it means
+ // If href == null, it means
Map segments = new LinkedHashMap();
// TODO Special case http://jira.codehaus.org/browse/MEV-40