slachiewicz commented on issue #103:
URL:
https://github.com/apache/maven-project-info-reports-plugin/issues/103#issuecomment-5226963237
Fixed in maven-reporting-impl: apache/maven-reporting-impl#243, merged as
736415fb, so it will be in maven-reporting-impl 4.0.1. MPIR picks it up on its
next release.
The cause, for the record: a report plugin never runs against its own Doxia.
`DefaultMavenReportExecutor` in maven-reporting-exec imports the
`org.apache.maven.doxia.sink` package from the Maven Site Plugin's class realm
into the report plugin's realm, and excludes `doxia-sink-api` from the report
plugin's own dependencies. So whatever Doxia the site plugin ships is what the
report gets, and `Sink.verbatim()` with no argument only exists in Doxia 2.
`AbstractMavenReportRenderer` now calls `verbatim(SinkEventAttributes)`
instead, which exists in Doxia 1 and 2 alike and is null-safe in both.
**Until that is released**, the workaround is to pin the Maven Site Plugin
to 3.21.0 or newer, which is the first version providing Doxia 2:
```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.22.0</version>
</plugin>
```
This matters more than it looks, because Maven 3.9.x still binds
maven-site-plugin **3.12.1** by default, which brings Doxia 1.11.1 — so `mvn
site` without an explicit version hits this on every affected report, and the
build still reports SUCCESS while the reports are silently cut short. I
reproduced it on Maven 3.9.16 with MPIR 3.9.0.
I will follow up with a documentation change here so the prerequisite is
stated rather than having to be discovered, per @hboutemy's first option above.
One thing still outstanding and worth tracking separately:
`AbstractMavenReportRenderer.verbatimSource()` still uses
`SinkEventAttributeSet.SOURCE`, which is named `BOXED` in Doxia 1 and so fails
the same way with a `NoSuchFieldError`. MPIR does not call it, but
maven-plugin-report-plugin does.
--
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]