slachiewicz opened a new issue, #187:
URL: https://github.com/apache/maven-reporting-exec/issues/187

   `MavenReportExecutorRequest` exposes two public methods whose type is 
package-private:
   
   ```java
   public ReportPlugin[] getReportPlugins()
   public void setReportPlugins(ReportPlugin[] reportPlugins)
   ```
   
   `org.apache.maven.reporting.exec.ReportPlugin` and `ReportSet` became 
package-private in 1.5 
([MSHARED-663](https://issues.apache.org/jira/browse/MSHARED-663), #65), once 
maven-site-plugin moved to the `org.apache.maven.model.ReportPlugin[]` overload 
added in 1.4 ([MSHARED-628](https://issues.apache.org/jira/browse/MSHARED-628), 
#62). The two accessors stayed public, so a caller outside the package can see 
them but cannot create a `ReportPlugin`, name the element type of the getter's 
result, or read its fields.
   
   Callers today:
   
   - [maven-site-plugin 
`AbstractSiteRenderingMojo`](https://github.com/apache/maven-site-plugin/blob/master/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java)
 uses only `setReportPlugins(org.apache.maven.model.ReportPlugin[])`.
   - `getReportPlugins()` and `setReportPlugins(ReportPlugin[])` are called 
only from `DefaultMavenReportExecutor` and the tests in this repository. A 
GitHub code search across `org:apache` finds no other caller.
   
   Options:
   
   1. Make both methods package-private. Clean, but binary-incompatible, so it 
needs a major version or a japicmp exclusion with a note in the release notes.
   2. Deprecate both in 2.1.0 with a pointer to the 
`org.apache.maven.model.ReportPlugin[]` setter, and make them package-private 
in the next major.
   3. Keep the internal array private and expose a public getter that returns 
`org.apache.maven.model.ReportPlugin[]`, if any caller needs to read the 
plugins back.
   
   Option 2 is the least disruptive and fits the 2.1.0 release planned in 
apache/maven#13085. This is an API decision, so no PR yet.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to