notice that the change is not in Maven itself: the reporting API has been extracted from Maven 2 to a separate reporting-api [1] artifact in Maven 3
I moved the MNG issue to https://issues.apache.org/jira/browse/MSHARED-1032 Regards, Hervé [1] https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/ maven/reporting/MavenReport.html Le mercredi 26 janvier 2022, 20:37:36 CET Benjamin Marwell a écrit : > Hi everyone, > > I would like to change the API from the ReportMojo. > > I was recently looking at > https://github.com/apache/maven-reporting-impl/blob/9050da0e7c2defed851621b6 > 2c0160b52716ba11/src/main/java/org/apache/maven/reporting/AbstractMavenRepor > t.java#L338-L342 > > But it seems the method boolean canGenerate() does not throw any exceptions. > OTOH I see that a lot of reports are scanning for files and have to > (possibly) deal with IOExceptions at some point, either via > Files.walk() or FileUtils.getFiles(). > > Sadly, we cannot just wrap them into a MojoExecutionException or > MavenReportException, because both are not thrown from that method, > AND the method canGenerate is called from two locations.So, what is > the recommended approach, if canGenerate encounters an IOException? > > For this reason, I would like to introduce this API change: > https://issues.apache.org/jira/browse/MNG-7393 > > Thanks,, > Ben > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org