in src/main/java/org/apache/maven/report/projectinfo/PluginsReport.java [174:219]
private void renderSectionPlugins(boolean isPlugins) {
List<GAV> list = isPlugins ? GAV.pluginsToGAV(plugins) : GAV.reportPluginsToGAV(reports, project);
String[] tableHeader = getPluginTableHeader();
startSection(getI18nString(isPlugins ? "build.title" : "report.title"));
if (list.isEmpty()) {
paragraph(getI18nString(isPlugins ? "nolist" : "report.nolist"));
endSection();
return;
}
Collections.sort(list, getPluginComparator());
startTable();
tableHeader(tableHeader);
ProjectBuildingRequest buildRequest = new DefaultProjectBuildingRequest(buildingRequest);
buildRequest.setRemoteRepositories(project.getPluginArtifactRepositories());
buildRequest.setProcessPlugins(false);
for (GAV plugin : list) {
VersionRange versionRange = VersionRange.createFromVersion(plugin.getVersion());
Artifact pluginArtifact = repositorySystem.createProjectArtifact(
plugin.getGroupId(), plugin.getArtifactId(), versionRange.toString());
try {
MavenProject pluginProject =
projectBuilder.build(pluginArtifact, buildRequest).getProject();
tableRow(getPluginRow(
pluginProject.getGroupId(),
pluginProject.getArtifactId(),
pluginProject.getVersion(),
pluginProject.getUrl()));
} catch (ProjectBuildingException e) {
log.info("Could not build project for " + plugin.getArtifactId(), e);
tableRow(getPluginRow(plugin.getGroupId(), plugin.getArtifactId(), plugin.getVersion(), null));
}
}
endTable();
endSection();
}