patpatpat123 opened a new pull request, #698:
URL: https://github.com/apache/maven-project-info-reports-plugin/pull/698

   Fixes #103.
   
   A report renders with the Doxia of the Maven Site Plugin in use, and Maven 
3.9.x still binds Site Plugin 3.12.1, which provides Doxia 1. To see where 
`master` stands there, I added an IT that declares no Site Plugin version at 
all, like a project that pins nothing. Reproducing the issue that way turned up 
three separate causes, and eight reports cut short:
   
   | Cause | Reports cut short | Affects |
   |---|---|---|
   | `Sink.verbatim()` only exists since Doxia 2 | `ci-management`, 
`dependency-info`, `issue-management`, `licenses`, `scm` | 3.7.0 onwards, the 
five in the issue |
   | `Sink.tableRows()` only exists since Doxia 2 | `dependency-convergence` | 
3.7.0 onwards, where a `reportSet` lists the report |
   | `sink.impl.SinkEventAttributeSet` of doxia-core 2.2.0 extends the new 
`sink.SinkEventAttributeSet` of doxia-sink-api 2.2.0 | `dependencies`, `team`, 
and `dependency-convergence` once it is past `tableRows()` | `master` only, 
since #678 |
   
   About the last one: Site Plugin 3.12.1 uses maven-reporting-exec 1.6.0, 
which shares a fixed list of classes with a report plugin (of 
`org.apache.maven.doxia.sink` only `Sink`, `SinkEventAttributes` and 
`SinkFactory`) and keeps `doxia-sink-api` out of the report plugin's own 
dependencies. `sink.impl.SinkEventAttributeSet` then comes from this plugin's 
doxia-core, and the 2.2.0 one needs a superclass that nothing in that class 
realm provides. It is the same class that #681 and #684 were closed over: the 
Doxia that the Site Plugin provides does not have it.
   
   What changes:
   
   - Doxia goes back to 2.1.0, and Dependabot ignores doxia-core and 
doxia-sink-api 2.2.0 and later, with the reason next to the other pins. No 
release had 2.2.0 (3.9.0 uses 2.0.0); the pin can be lifted once the new IT 
passes with a newer version.
   - `DependencyConvergenceReport` calls `tableRows(int[], boolean)`, which 
Doxia 1 has too.
   - `AbstractProjectInfoRenderer` overrides `verbatimText` and `verbatimLink` 
with the calls from apache/maven-reporting-impl#243. The overrides can be 
removed once this plugin uses a maven-reporting-impl release with that fix.
   - The usage page says that 3.10.0 works again with the Site Plugin Maven 
binds by default, and names `dependency-convergence` among the reports affected 
before.
   - IT `default-site-plugin` checks that no report is skipped with a 
`LinkageError` and that each affected report has the content it used to lose. 
On Maven 3.9.x it also fails if Site Plugin 3.12.1 is no longer the one bound, 
so it cannot quietly stop covering Doxia 1. A small unit test covers the 
verbatim overrides.
   
   For a Site Plugin that provides Doxia 2 nothing changes: its `AbstractSink` 
implements `verbatim()` and `tableRows()` by calling `verbatim(null)` and 
`tableRows(null, false)`, which the plugin now calls directly.
   
   Verified: `mvn -Prun-its verify -Dmaven.clean.skip=true` (Maven 3.9.10, JDK 
25) -> 35 unit tests and 26 ITs pass.
   
   Without the three fixes the new IT finds the eight reports above skipped, 
and it fails again with any single one of them reverted. I did not run the 
released versions: "3.7.0 onwards" comes from the issue for the first row and, 
for the second, from the release tags, which have the same `sink.tableRows()` 
calls. The IT exercises Doxia 1 on Maven 3.9.x only; on Maven 4 it renders with 
that Maven's default Site Plugin, which I have not run locally.
   
   I am happy to split or rework this if you would rather keep Doxia 2.2.0 
another way, or leave the verbatim part to the next maven-reporting-impl 
release (the five reports from the issue would then wait for it). Thanks for 
the analysis in the issue and in apache/maven-reporting-impl#243; it made this 
much easier to follow up on.
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [ ] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [ ] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
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