apache / apache/maven-reporting-impl

NPE on reporting goal when multi-pages report

Open
#217 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
7
Forks
12
Avg merge
9m
Merged PRs (30d)
2

Description

### Affected version

4.0.0

### Bug description

```
$ mvn plugin-report:3.15.1:report -e
...
[INFO] --- plugin-report:3.15.1:report (default-cli) @ maven-clean-plugin ---
[INFO] Rendering content with org.apache.maven.skins:maven-fluido-skin:jar:2.1.0 skin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.259 s
[INFO] Finished at: 2025-12-17T13:36:58+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-report-plugin:3.15.1:report (default-cli) on project maven-clean-plugin: Execution default-cli of goal org.apache.maven.plugins:maven-plugin-report-plugin:3.15.1:report failed: Cannot invoke "org.apache.maven.doxia.sink.SinkFactory.createSink(java.io.File, String)" because the return value of "org.apache.maven.plugin.plugin.report.PluginReport.getSinkFactory()" is null -> [Help 1]
[ERROR]
...
Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.maven.doxia.sink.SinkFactory.createSink(java.io.File, String)" because the return value of "org.apache.maven.plugin.plugin.report.PluginReport.getSinkFactory()" is null
at org.apache.maven.plugin.plugin.report.PluginReport.generateMojosDocumentation (PluginReport.java:280)
at org.apache.maven.plugin.plugin.report.PluginReport.executeReport (PluginReport.java:184)
at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:358)
at org.apache.maven.reporting.AbstractMavenReport.reportToSite (AbstractMavenReport.java:266)
at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:212)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
```

not really a surprise given comment in code:
https://github.com/apache/maven-reporting-impl/blob/maven-reporting-impl-4.0.0/src/main/java/org/apache/maven/reporting/AbstractMavenReport.java#L265

but not tested for now

Contributor guide

No contributing guide indexed for this repository

Research direction

Run the reported Maven plugin-report command and inspect PluginReport.generateMojosDocumentation at line 280, then read the AbstractMavenReport comment around line 265. Add a regression test for a multi-page report and verify that report generation completes without the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.