[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-24 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736695#comment-17736695
 ] 

Michael Osipov commented on MSHARED-1032:
-

I have tested it now locally. MPIR works with w/o source code modification. I 
will upload the branches for you guys to verify, if it works as I expect we can 
change the signature.

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-23 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17736407#comment-17736407
 ] 

Michael Osipov commented on MSHARED-1032:
-

Duplcate call has been resolved, let's move on with the actual request...

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-21 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17735900#comment-17735900
 ] 

Michael Osipov commented on MSHARED-1032:
-

[~bmarwell], you are right. It is indeed called twice for standalone AND Maven 
Site Plugin use case in 
{{org.apache.maven.reporting.AbstractMavenReport.generate(Sink, SinkFactory, 
Locale)}} also both uses cases make sure that {{canGenerateReport()}} is 
invoked before {{generate()}} is invoked. This is clearly redudant an can incur 
a performance overhead. I will create a new issue and provide a PR.

As for the actual request: There are two spots which are subject to the call, I 
think we can add this exception, I have already found a suitable usecase, but 
need to check how the system behavior since the signature has changed.

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-18 Thread Benjamin Marwell (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733939#comment-17733939
 ] 

Benjamin Marwell commented on MSHARED-1032:
---

Ha, I wish I knew which plugin I was trying to modify when I stumbled over 
this. Probably the checkstyle-plugin.

Maybe I did not mean "double call", but instead "called on two occurences", but 
that is hard to guess from now. If it was from two different entry points, it 
should be two different methods (imho). The default can be that one calls 
another...

 

Then there's the exception issue, yes, which can be solved right afterwards.

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-18 Thread Herve Boutemy (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733872#comment-17733872
 ] 

Herve Boutemy commented on MSHARED-1032:


now I re-read the issue from the start: "of course", not "throw Exception"
but something like renderexception (precise exception has to be chosen)

and "of course", we're talking about changing reporting-api , and it will 
impact m-site-p and reporting-impl (which is the mini site:site implementation)

I've been confused with the related MSHARED-193 that has the same discussion 
for another API call of reporting-api

notice: these issues should be associated to reporting-api only
impact on maven-site-plugin and reporting-api will be when they upgrade their 
dependency on reporting-api

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-18 Thread Herve Boutemy (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733868#comment-17733868
 ] 

Herve Boutemy commented on MSHARED-1032:


execute() and generate() does not mean executed twice: it means executed as a 
direct goal or executed as a report in site:site goal

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2023-06-17 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17733735#comment-17733735
 ] 

Michael Osipov commented on MSHARED-1032:
-

[~bmarwell], looking again at this before GA: Regardless of the exception you 
need {{canGenerateReport()}} should not be called twice since it may contain 
expensive calls. I'd say that we first need to solve the double call before 
this can be discussed. WDYT?

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
>  Labels: doxia-2.0.0-stack
>
> Hi everyone,
> the [{{AbstractReportMojo}} in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [{{canGenerateReport()}} from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2022-01-27 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483167#comment-17483167
 ] 

Michael Osipov commented on MSHARED-1032:
-

The reason is that one is report and the other mojo. We have components which 
do both. Maybe this can be better solved.

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
> Fix For: maven-reporting-api-3.1.0
>
>
> Hi everyone,
> the [`{{AbstractReportMojo}}` in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [`{{canGenerateReport()}}` from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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 `{{{}canGenerateReports(){}}}`
>  * Removing the declared {{IOException}} in PlexusUtils ([PR 
> exists|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2022-01-27 Thread Benjamin Marwell (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483137#comment-17483137
 ] 

Benjamin Marwell commented on MSHARED-1032:
---

`canGenrateReport()` is actually called twice: in `execute()` and then in 
`generate()` again (which is also called by `execute()`).

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
> Fix For: maven-reporting-api-3.1.0
>
>
> Hi everyone,
> the [`{{AbstractReportMojo}}` in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [`{{canGenerateReport()}}` from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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 `{{{}canGenerateReports(){}}}`
>  * Removing the declared {{IOException}} in PlexusUtils ([PR 
> exists|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2022-01-27 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17483110#comment-17483110
 ] 

Michael Osipov commented on MSHARED-1032:
-

Don't confuse {{generate()}} with {{execute()}} one is report while the latter 
is mojo. [~hboutemy], the major/minor issue needs to be analyzed. I'd like to 
finalize the lift to Doxia (Sitetools) 1.11.1 first and then move to issues 
like this.

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
> Fix For: maven-reporting-api-3.1.0
>
>
> Hi everyone,
> the [`{{AbstractReportMojo}}` in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [`{{canGenerateReport()}}` from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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 `{{{}canGenerateReports(){}}}`
>  * Removing the declared {{IOException}} in PlexusUtils ([PR 
> exists|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2022-01-26 Thread Herve Boutemy (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17482931#comment-17482931
 ] 

Herve Boutemy commented on MSHARED-1032:


we'll define everything step by step:
 # it will be for the next version of reporting-api 
[https://maven.apache.org/shared/maven-reporting-api/] (unrelated to Maven 4)
 # we'll see if finally the next version of maven-reporting-api is 3.1 or 4.0
 # we'll se also which exception to add: reading the javadoc, it seems that 
MavenReportException looks like a better choice 
[https://maven.apache.org/shared/maven-reporting-api/apidocs/index.html] , 
because reporting-api is not tied to Mojo at all (that's the role of 
reporting-impl to fill the gap: 
[https://maven.apache.org/shared/maven-reporting-impl/] )

on major and minor question, IMHO the important aspect is binary compatibility:
 # will a new report using this modified API with an Exception still be usable 
from maven-site-plugin 3.x?
 # will an old report using unmodified 3.0 API without exception still be 
usable from maven-site-plugin that support the new API signature?

IMHO, that will impact our choice of version both for maven-reporting-api AND 
maven-site-plugin

 

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
> Fix For: maven-reporting-api-3.1.0
>
>
> Hi everyone,
> the [`{{AbstractReportMojo}}` in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [`{{canGenerateReport()}}` from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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 `{{{}canGenerateReports(){}}}`
>  * Removing the declared {{IOException}} in PlexusUtils ([PR 
> exists|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2022-01-26 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17482928#comment-17482928
 ] 

Michael Osipov commented on MSHARED-1032:
-

[~hboutemy], really in a minor version? 

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
> Fix For: maven-reporting-api-3.1.0
>
>
> Hi everyone,
> the [`{{AbstractReportMojo}}` in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [`{{canGenerateReport()}}` from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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 `{{{}canGenerateReports(){}}}`
>  * Removing the declared {{IOException}} in PlexusUtils ([PR 
> exists|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (MSHARED-1032) API change: let canGenerateReport() throw an Exception

2022-01-26 Thread Herve Boutemy (Jira)


[ 
https://issues.apache.org/jira/browse/MSHARED-1032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17482927#comment-17482927
 ] 

Herve Boutemy commented on MSHARED-1032:


I added links to javadoc for reporting-impl and reporting-api, to better 
describe where the API update questions really happen :)

> API change: let canGenerateReport() throw an Exception
> --
>
> Key: MSHARED-1032
> URL: https://issues.apache.org/jira/browse/MSHARED-1032
> Project: Maven Shared Components
>  Issue Type: Improvement
>  Components: maven-reporting-api
>Affects Versions: maven-reporting-api-3.0
>Reporter: Benjamin Marwell
>Priority: Major
> Fix For: maven-reporting-api-3.1.0
>
>
> Hi everyone,
> the [`{{AbstractReportMojo}}` in 
> reporting-impl|https://maven.apache.org/shared/maven-reporting-impl/apidocs/org/apache/maven/reporting/AbstractMavenReport.html]
>  implements a method [`{{canGenerateReport()}}` from 
> reporting-api|https://maven.apache.org/shared/maven-reporting-api/apidocs/org/apache/maven/reporting/MavenReport.html].
> 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 `{{{}canGenerateReports(){}}}`
>  * Removing the declared {{IOException}} in PlexusUtils ([PR 
> exists|https://github.com/codehaus-plexus/plexus-utils/issues/180]) and 
> Maven-Utils (issue: tbd).
> Thanks!
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)