Skip to content

Commit

Permalink
[MPIR-466] ModulesReport/IndexReport do not pass a complete building …
Browse files Browse the repository at this point in the history
…request to renderer

This closes #75
  • Loading branch information
gnodet authored and michael-o committed Jul 11, 2024
1 parent 73658c3 commit 67ecd33
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -66,6 +67,7 @@ public void executeReport(Locale locale) {
project,
getReactorProjects(),
projectBuilder,
getSession().getProjectBuildingRequest(),
localRepository,
getName(locale),
getDescription(locale),
Expand Down Expand Up @@ -106,6 +108,7 @@ private static class ProjectIndexRenderer extends ModulesReport.ModulesRenderer
MavenProject project,
List<MavenProject> reactorProjects,
ProjectBuilder projectBuilder,
ProjectBuildingRequest buildingRequest,
ArtifactRepository localRepository,
String title,
String description,
Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public void executeReport(Locale locale) {
getProject(),
getReactorProjects(),
projectBuilder,
getSession().getProjectBuildingRequest(),
localRepository,
getI18N(locale),
locale,
Expand Down Expand Up @@ -102,6 +103,8 @@ static class ModulesRenderer extends AbstractProjectInfoRenderer {

protected ProjectBuilder projectBuilder;

protected ProjectBuildingRequest buildingRequest;

protected ArtifactRepository localRepository;

protected SiteTool siteTool;
Expand All @@ -111,6 +114,7 @@ static class ModulesRenderer extends AbstractProjectInfoRenderer {
MavenProject project,
List<MavenProject> reactorProjects,
ProjectBuilder projectBuilder,
ProjectBuildingRequest buildingRequest,
ArtifactRepository localRepository,
I18N i18n,
Locale locale,
Expand All @@ -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;
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 67ecd33

Please sign in to comment.