We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Consider the following multi-module maven project.
On running mvn -pl child1,child2/GrandChild1 clean scoverage:report -e, the command fails with the following null pointer exception:
mvn -pl child1,child2/GrandChild1 clean scoverage:report -e
[INFO] Reactor Summary: [INFO] [INFO] child1 1.0-SNAPSHOT ................................ SUCCESS [ 7.912 s] [INFO] child3 1.0-SNAPSHOT ................................ FAILURE [ 5.126 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.185 s [INFO] Finished at: 2022-02-02T21:57:03-08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.scoverage:scoverage-maven-plugin:1.4.11:report (default-cli) on project child3: An error has occurred in SCoverage report generation: Report generation exception: NullPointerException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.scoverage:scoverage-maven-plugin:1.4.11:report (default-cli) on project child3: An error has occurred in SCoverage report generation: Report generation exception . . . Caused by: java.lang.NullPointerException at org.scoverage.plugin.SCoverageReportMojo.rebase (SCoverageReportMojo.java:560) at org.scoverage.plugin.SCoverageReportMojo.generateAggregatedReports (SCoverageReportMojo.java:506) at org.scoverage.plugin.SCoverageReportMojo.generate (SCoverageReportMojo.java:230) at org.scoverage.plugin.SCoverageReportMojo.execute (SCoverageReportMojo.java:385) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
This is because neither child1 nor child3 returns true for module.isExecutionRoot() and thus topLevelModule is always null.
module.isExecutionRoot()
topLevelModule
scoverage-maven-plugin/src/main/java/org/scoverage/plugin/SCoverageReportMojo.java
Lines 440 to 446 in 163bbe9
The text was updated successfully, but these errors were encountered:
seems related to #93
Sorry, something went wrong.
Add a test for NPE in scoverage#103
6767c3b
ccbd8d0
Successfully merging a pull request may close this issue.
Hi,
Consider the following multi-module maven project.
On running
mvn -pl child1,child2/GrandChild1 clean scoverage:report -e
, the command fails with the following null pointer exception:This is because neither child1 nor child3 returns true for
module.isExecutionRoot()
and thustopLevelModule
is always null.scoverage-maven-plugin/src/main/java/org/scoverage/plugin/SCoverageReportMojo.java
Lines 440 to 446 in 163bbe9
The text was updated successfully, but these errors were encountered: