in maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginOverviewRenderer.java [106:173]
private void renderGoalsSection(boolean hasMavenReport) {
startSection(getI18nString("goals"));
paragraph(getI18nString("goals.intro"));
startTable();
String goalColumnName = getI18nString("goals.column.goal");
String isMavenReport = getI18nString("goals.column.isMavenReport");
String descriptionColumnName = getI18nString("goals.column.description");
if (hasMavenReport) {
tableHeader(new String[] {goalColumnName, isMavenReport, descriptionColumnName});
} else {
tableHeader(new String[] {goalColumnName, descriptionColumnName});
}
List<MojoDescriptor> mojos = new ArrayList<>();
mojos.addAll(pluginDescriptor.getMojos());
PluginUtils.sortMojos(mojos);
for (MojoDescriptor mojo : mojos) {
sink.tableRow();
String goalName = mojo.getFullGoalName();
/*
* Added ./ to define a relative path
* @see AbstractMavenReportRenderer#getValidHref(java.lang.String)
*/
String goalDocumentationLink = "./" + mojo.getGoal() + "-mojo.html";
sink.tableCell();
link(goalDocumentationLink, goalName);
sink.tableCell_();
if (hasMavenReport) {
if (PluginUtils.isMavenReport(mojo.getImplementation(), project)) {
tableCell(getI18nString("isReport"));
} else {
tableCell(getI18nString("isNotReport"));
}
}
sink.tableCell();
if (StringUtils.isNotEmpty(mojo.getDeprecated())) {
sink.division();
sink.inline(SinkEventAttributeSet.Semantics.STRONG);
sink.text(getI18nString("goal.deprecated"));
sink.text(".");
sink.inline_();
sink.text(" ");
sink.rawText(mojo.getDeprecated());
sink.division_();
sink.lineBreak();
}
String description;
if (StringUtils.isNotEmpty(mojo.getDescription())) {
description = mojo.getDescription();
} else {
description = getI18nString("goal.nodescription");
}
sink.rawText(description);
sink.tableCell_();
sink.tableRow_();
}
endTable();
endSection();
}