Skip to content

Commit

Permalink
[MSITE-970] Upgrade to Maven Reporting API 4.0.0-M7, Maven Reporting …
Browse files Browse the repository at this point in the history
…Impl 4.0.0-M9, Maven Reporting Exec 2.0.0-M9
  • Loading branch information
michael-o committed Jul 7, 2023
1 parent 8aa5412 commit 0e4b54e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ under the License.
<projectInfoReportsPluginVersion>3.4.5</projectInfoReportsPluginVersion>
<surefirePluginVersion>3.0.0</surefirePluginVersion>
<mavenPluginPluginVersion>3.9.0</mavenPluginPluginVersion>
<mavenReportingImplVersion>4.0.0-M8</mavenReportingImplVersion>
<mavenReportingImplVersion>4.0.0-M9</mavenReportingImplVersion>
<testingFluidoSkinVersion>2.0.0-M6</testingFluidoSkinVersion>
<surefire.version>3.1.2</surefire.version>
<project.build.outputTimestamp>2023-04-29T19:38:51Z</project.build.outputTimestamp>
Expand All @@ -220,12 +220,12 @@ under the License.
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-api</artifactId>
<version>4.0.0-M6</version>
<version>4.0.0-M7</version>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-exec</artifactId>
<version>2.0.0-M8</version>
<version>2.0.0-M9</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.MavenReport;
import org.apache.maven.reporting.MavenReportException;
import org.apache.maven.reporting.exec.MavenReportExecution;
import org.apache.maven.reporting.exec.MavenReportExecutor;
import org.apache.maven.reporting.exec.MavenReportExecutorRequest;
Expand Down Expand Up @@ -214,8 +215,14 @@ protected List<MavenReportExecution> getReports() throws MojoExecutionException
// filter out reports that can't be generated
List<MavenReportExecution> reportExecutions = new ArrayList<>(allReports.size());
for (MavenReportExecution exec : allReports) {
if (exec.canGenerateReport()) {
reportExecutions.add(exec);
try {
if (exec.canGenerateReport()) {
reportExecutions.add(exec);
}
} catch (MavenReportException e) {
String reportMojoInfo = exec.getPlugin().getId() + ":" + exec.getGoal();
throw new MojoExecutionException(
String.format("Failed to determine whether report '%s' can be generated", reportMojoInfo), e);
}
}
return reportExecutions;
Expand Down

0 comments on commit 0e4b54e

Please sign in to comment.