diff --git a/src/main/java/org/apache/maven/report/projectinfo/IndexReport.java b/src/main/java/org/apache/maven/report/projectinfo/IndexReport.java index 8c15bf29..5cfae0f9 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/IndexReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/IndexReport.java @@ -28,6 +28,7 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.project.MavenProject; import org.apache.maven.project.ProjectBuilder; +import org.apache.maven.project.ProjectBuildingRequest; import org.codehaus.plexus.i18n.I18N; /** @@ -66,6 +67,7 @@ public void executeReport(Locale locale) { project, getReactorProjects(), projectBuilder, + getSession().getProjectBuildingRequest(), localRepository, getName(locale), getDescription(locale), @@ -106,6 +108,7 @@ private static class ProjectIndexRenderer extends ModulesReport.ModulesRenderer MavenProject project, List reactorProjects, ProjectBuilder projectBuilder, + ProjectBuildingRequest buildingRequest, ArtifactRepository localRepository, String title, String description, @@ -114,7 +117,17 @@ private static class ProjectIndexRenderer extends ModulesReport.ModulesRenderer Locale locale, Log log, SiteTool siteTool) { - super(sink, project, reactorProjects, projectBuilder, localRepository, i18n, locale, log, siteTool); + super( + sink, + project, + reactorProjects, + projectBuilder, + buildingRequest, + localRepository, + i18n, + locale, + log, + siteTool); this.title = title; diff --git a/src/main/java/org/apache/maven/report/projectinfo/ModulesReport.java b/src/main/java/org/apache/maven/report/projectinfo/ModulesReport.java index 15854ffa..a173cde6 100644 --- a/src/main/java/org/apache/maven/report/projectinfo/ModulesReport.java +++ b/src/main/java/org/apache/maven/report/projectinfo/ModulesReport.java @@ -67,6 +67,7 @@ public void executeReport(Locale locale) { getProject(), getReactorProjects(), projectBuilder, + getSession().getProjectBuildingRequest(), localRepository, getI18N(locale), locale, @@ -102,6 +103,8 @@ static class ModulesRenderer extends AbstractProjectInfoRenderer { protected ProjectBuilder projectBuilder; + protected ProjectBuildingRequest buildingRequest; + protected ArtifactRepository localRepository; protected SiteTool siteTool; @@ -111,6 +114,7 @@ static class ModulesRenderer extends AbstractProjectInfoRenderer { MavenProject project, List reactorProjects, ProjectBuilder projectBuilder, + ProjectBuildingRequest buildingRequest, ArtifactRepository localRepository, I18N i18n, Locale locale, @@ -121,6 +125,7 @@ static class ModulesRenderer extends AbstractProjectInfoRenderer { this.project = project; this.reactorProjects = reactorProjects; this.projectBuilder = projectBuilder; + this.buildingRequest = buildingRequest; this.localRepository = localRepository; this.siteTool = siteTool; this.log = log; @@ -157,7 +162,7 @@ protected void renderBody() { final String baseUrl = getDistMgmntSiteUrl(project); - ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest(); + ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest(this.buildingRequest); buildingRequest.setLocalRepository(localRepository); buildingRequest.setProcessPlugins(false);