Benjamin Marwell opened MSHARED-1032 and commented
Hi everyone,
the AbstractReportMojo in reporting-impl implements a method canGenerateReport() from reporting-api.
However, it is unable to throw any exceptions. Not even MojoExecutionEx or MavenReportEx, which is most unfortunate.
It is being used twice:
Once in execute() throws MojoExEx
and in
generate() throws MavenReportEx (and is called by execute()).
This way, there is no way for reporting plugins to scan for files, because FileUtils::getFiles DOES throw a {}IOException{}, which then cannot be wrapped. However, the IOException from that method is useless anyway, because it is never declared in any methods it calls.
Therefore please consider:
- Declaring any Exception on
canGenerateReport()
- Removing the declared
IOException in PlexusUtils (PR exists) and Maven-Utils (issue: tbd).
Thanks!
Affects: maven-reporting-api-3.0
Issue Links:
- MSHARED-1275 MavenReport#canGenerateReport() is invoked twice
("causes")
- MSHARED-193 API change: let MavenReportRenderer#render() throw an exception
Remote Links:
Benjamin Marwell opened MSHARED-1032 and commented
Hi everyone,
the
AbstractReportMojoin reporting-impl implements a methodcanGenerateReport()from reporting-api.However, it is unable to throw any exceptions. Not even
MojoExecutionExorMavenReportEx, which is most unfortunate.It is being used twice:
Once in
execute() throws MojoExExand in
generate() throws MavenReportEx(and is called by execute()).This way, there is no way for reporting plugins to scan for files, because
FileUtils::getFilesDOES throw a{}IOException{}, which then cannot be wrapped. However, theIOExceptionfrom that method is useless anyway, because it is never declared in any methods it calls.Therefore please consider:
canGenerateReport()IOExceptionin PlexusUtils (PR exists) and Maven-Utils (issue: tbd).Thanks!
Affects: maven-reporting-api-3.0
Issue Links:
("causes")
Remote Links: