NPE on reporting goal when multi-pages report
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
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.
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
- Dominant language
- Java
- Stars
- 7
- Forks
- 12
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-reporting-impl
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 62/100
apache/maven-reporting-impl#184 · 7 comments ·
All issues in apache/maven-reporting-impl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100