GitLab CI/CD 中 运行 时出现 NullPointerException

NullPointerException when running in GitLab CI/CD

我 运行 在我的多模块项目和我的机器上使用 Clover Maven 插件进行代码覆盖率分析,一切运行良好。但是,当我推送到 GitLab 时,运行程序在 Clover 执行时失败,日志中有许多 NullPointerExceptions:

253348 [ERROR] Failed to execute goal org.openclover:clover-maven-plugin:4.2.1:clover (default-cli) on project axians-framework: Execution default-cli of goal org.openclover:clover-maven-plugin:4.2.1:clover failed: java.lang.InternalError: java.lang.reflect.InvocationTargetException: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openclover:clover-maven-plugin:4.2.1:clover (default-cli) on project axians-framework: Execution default-cli of goal org.openclover:clover-maven-plugin:4.2.1:clover failed: java.lang.InternalError: java.lang.reflect.InvocationTargetException
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.openclover:clover-maven-plugin:4.2.1:clover failed: java.lang.InternalError: java.lang.reflect.InvocationTargetException
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:145)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.tools.ant.BuildException: java.lang.InternalError: java.lang.reflect.InvocationTargetException
    at org.apache.tools.ant.dispatch.DispatchUtils.execute (DispatchUtils.java:116)
    at org.apache.tools.ant.Task.perform (Task.java:348)
    at org.apache.tools.ant.Target.execute (Target.java:435)
    at org.apache.tools.ant.Target.performTasks (Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets (Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget (Project.java:1364)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.createReport (CloverReportMojo.java:461)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.createAllReportTypes (CloverReportMojo.java:404)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.executeReport (CloverReportMojo.java:393)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:135)
    at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:87)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
253358 [WARNING] null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecutejava.lang.NullPointerException (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute
 (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main    at com.atlassian.clover.reporters.html.RenderFileAction.call (RenderFileAction.java:111)
    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call (CloverExecutors.java:91)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    at java.lang.Thread.run (Thread.java:844)
253365 [WARNING] null
java.lang.NullPointerException
    at253362 [WARNING] null
java.lang.NullPointerException
 (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke com.atlassian.clover.reporters.html.RenderFileAction.call (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (RenderFileAction.java:111) (Method.java:564)
        atat org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call (Launcher.java:289)
 com.atlassian.clover.reporters.html.RenderFileAction.call    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (CloverExecutors.java:91)
    at (RenderFileAction.java:111)
    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415) (CloverExecutors.java:91)

    at java.util.concurrent.FutureTask.runat org.codehaus.plexus.classworlds.launcher.Launcher.main (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (Launcher.java:356)
Caused by: java.lang.InternalError: java.lang.reflect.InvocationTargetException java.util.concurrent.FutureTask.run
 (ThreadPoolExecutor.java:1167)
    at (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
     java.util.concurrent.ThreadPoolExecutor$Worker.runat java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    at java.lang.Thread.run (ThreadPoolExecutor.java:641)
 (Thread.java:844)    
at253369 [WARNING] null
 java.lang.Thread.runjava.lang.NullPointerException
    at com.atlassian.clover.reporters.html.RenderFileAction.call (Thread.java:844)
 (RenderFileAction.java:111)
    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call253370 [WARNING] null
java.lang.NullPointerException (CloverExecutors.java:91)

        atat java.util.concurrent.FutureTask.run com.atlassian.clover.reporters.html.RenderFileAction.call (FutureTask.java:264)
     (RenderFileAction.java:111)at
    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call java.util.concurrent.ThreadPoolExecutor.runWorker (CloverExecutors.java:91)
     (ThreadPoolExecutor.java:1167)at
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    at java.util.concurrent.FutureTask.run java.lang.Thread.run (Thread.java:844)
 (FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    253371 [WARNING] null
java.lang.NullPointerException
at     java.lang.Thread.runat (Thread.java:844)
 com.atlassian.clover.reporters.html.RenderFileAction.call253372 [WARNING] null
 (RenderFileAction.java:111)java.lang.NullPointerException

    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call (CloverExecutors.java:91)
    at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    at    at sun.font.FontManagerFactory.run (FontManagerFactory.java:86)
    at java.security.AccessController.doPrivileged (Native Method)
    at sun.font.FontManagerFactory.getInstance (FontManagerFactory.java:74)
        at sun.font.SunFontManager.getInstance java.util.concurrent.ThreadPoolExecutor.runWorker (SunFontManager.java:251)at
     com.atlassian.clover.reporters.html.RenderFileAction.callat sun.font.FontDesignMetrics.getMetrics (FontDesignMetrics.java:264)
    at sun.java2d.SunGraphics2D.getFontMetrics (ThreadPoolExecutor.java:1167)
     (RenderFileAction.java:111)
    atat (SunGraphics2D.java:864)
    at clover.org.jfree.chart.axis.ValueAxis.findMaximumTickLabelWidth java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    at com.atlassian.clover.util.CloverExecutors$LoggingCallable.call (CloverExecutors.java:91) java.lang.Thread.run (Thread.java:844)
 (ValueAxis.java:916)
    at clover.org.jfree.chart.axis.ValueAxis.reserveSpace (ValueAxis.java:828)
    at clover.org.jfree.chart.plot.XYPlot.calculateRangeAxisSpace
    at (XYPlot.java:3077)
    at clover.org.jfree.chart.plot.XYPlot.calculateAxisSpace java.util.concurrent.FutureTask.run (XYPlot.java:2988)
    at clover.org.jfree.chart.plot.XYPlot.draw (FutureTask.java:264) (XYPlot.java:3132)
    at java.util.concurrent.ThreadPoolExecutor.runWorker
    at clover.org.jfree.chart.JFreeChart.draw (ThreadPoolExecutor.java:1167) (JFreeChart.java:1229)
    at
    at clover.org.jfree.chart.JFreeChart.createBufferedImage java.util.concurrent.ThreadPoolExecutor$Worker.run (JFreeChart.java:1399)
    at (ThreadPoolExecutor.java:641) clover.org.jfree.chart.ChartUtilities.writeChartAsPNG
    at java.lang.Thread.run (ChartUtilities.java:211)
    at clover.org.jfree.chart.ChartUtilities.saveChartAsPNG (ChartUtilities.java:341)
    at com.atlassian.clover.reporters.util.CloverChartFactory.generateHistogramChart (Thread.java:844)
 (CloverChartFactory.java:156)
    at com.atlassian.clover.reporters.html.HtmlReporter.executeCurrentReport (HtmlReporter.java:267)
    at com.atlassian.clover.reporters.html.HtmlReporter.executeImpl (HtmlReporter.java:189)
    at com.atlassian.clover.reporters.CloverReporter.execute (CloverReporter.java:38)
    at com.atlassian.clover.ant.tasks.CloverReportTask.generateReports (CloverReportTask.java:435)
    at com.atlassian.clover.ant.tasks.CloverReportTask.cloverExecute (CloverReportTask.java:395)
    at com.atlassian.clover.ant.tasks.AbstractCloverTask.execute (AbstractCloverTask.java:57)
    at org.apache.tools.ant.UnknownElement.execute (UnknownElement.java:292)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute (DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform (Task.java:348)
    at org.apache.tools.ant.Target.execute (Target.java:435)
    at org.apache.tools.ant.Target.performTasks (Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets (Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget (Project.java:1364)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.createReport (CloverReportMojo.java:461)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.createAllReportTypes (CloverReportMojo.java:404)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.executeReport (CloverReportMojo.java:393)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:135)
    at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:87)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:488)
    at sun.font.FontManagerFactory.run (FontManagerFactory.java:84)
    at java.security.AccessController.doPrivileged (Native Method)
    at sun.font.FontManagerFactory.getInstance (FontManagerFactory.java:74)
    at sun.font.SunFontManager.getInstance (SunFontManager.java:251)
    at sun.font.FontDesignMetrics.getMetrics (FontDesignMetrics.java:264)
    at sun.java2d.SunGraphics2D.getFontMetrics (SunGraphics2D.java:864)
    at clover.org.jfree.chart.axis.ValueAxis.findMaximumTickLabelWidth (ValueAxis.java:916)
    at clover.org.jfree.chart.axis.ValueAxis.reserveSpace (ValueAxis.java:828)
    at clover.org.jfree.chart.plot.XYPlot.calculateRangeAxisSpace (XYPlot.java:3077)
    at clover.org.jfree.chart.plot.XYPlot.calculateAxisSpace (XYPlot.java:2988)
    at clover.org.jfree.chart.plot.XYPlot.draw (XYPlot.java:3132)
    at clover.org.jfree.chart.JFreeChart.draw (JFreeChart.java:1229)
    at clover.org.jfree.chart.JFreeChart.createBufferedImage (JFreeChart.java:1399)
    at clover.org.jfree.chart.ChartUtilities.writeChartAsPNG (ChartUtilities.java:211)
    at clover.org.jfree.chart.ChartUtilities.saveChartAsPNG (ChartUtilities.java:341)
    at com.atlassian.clover.reporters.util.CloverChartFactory.generateHistogramChart (CloverChartFactory.java:156)
    at com.atlassian.clover.reporters.html.HtmlReporter.executeCurrentReport (HtmlReporter.java:267)
    at com.atlassian.clover.reporters.html.HtmlReporter.executeImpl (HtmlReporter.java:189)
    at com.atlassian.clover.reporters.CloverReporter.execute (CloverReporter.java:38)
    at com.atlassian.clover.ant.tasks.CloverReportTask.generateReports (CloverReportTask.java:435)
    at com.atlassian.clover.ant.tasks.CloverReportTask.cloverExecute (CloverReportTask.java:395)
    at com.atlassian.clover.ant.tasks.AbstractCloverTask.execute (AbstractCloverTask.java:57)
    at org.apache.tools.ant.UnknownElement.execute (UnknownElement.java:292)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute (DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform (Task.java:348)
    at org.apache.tools.ant.Target.execute (Target.java:435)
    at org.apache.tools.ant.Target.performTasks (Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets (Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget (Project.java:1364)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.createReport (CloverReportMojo.java:461)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.createAllReportTypes (CloverReportMojo.java:404)
    at com.atlassian.maven.plugin.clover.CloverReportMojo.executeReport (CloverReportMojo.java:393)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:135)
    at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:87)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.NullPointerException
    at sun.awt.FontConfiguration.getVersion (FontConfiguration.java:1288)
    at sun.awt.FontConfiguration.readFontConfigFile (FontConfiguration.java:225)
    at sun.awt.FontConfiguration.init (FontConfiguration.java:107)
    at sun.awt.X11FontManager.createFontConfiguration (X11FontManager.java:765)
    at sun.font.SunFontManager.run (SunFontManager.java:440)
    at java.security.AccessController.doPrivileged (Native Method)
    at sun.font.SunFontManager.<init> (SunFontManager.java:385)
    at sun.awt.FcFontManager.<init> (FcFontManager.java:35)
    at sun.awt.X11FontManager.<init> (X11FontManager.java:56)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance (Constructor.java:488)
    at sun.font.FontManagerFactory.run (FontManagerFactory.java:84)
    at java.security.AccessController.doPrivileged (Native Method)
    at sun.font.FontManagerFactory.getInstance (FontManagerFactory.java:74)
    at sun.font.SunFontManager.getInstance (SunFontManager.java:251)
    at sun.font.FontDesignMetrics.getMetrics (FontDesignMetrics.java:264)
    at sun.java2d.SunGraphics2D.getFontMetrics (SunGraphics2D.java:864)
    at clover.org.jfree.chart.axis.ValueAxis.findMaximumTickLabelWidth (ValueAxis.java:916)
    at clover.org.jfree.chart.axis.ValueAxis.reserveSpace (ValueAxis.java:828)
    at clover.org.jfree.chart.plot.XYPlot.calculateRangeAxisSpace (XYPlot.java:3077)
    at clover.org.jfree.chart.plot.XYPlot.calculateAxisSpace (XYPlot.java:2988)
    at clover.org.jfree.chart.plot.XYPlot.draw (XYPlot.java:3132)
    at clover.org.jfree.chart.JFreeChart.draw (JFreeChart.java:1229)
    at clover.org.jfree.chart.JFreeChart.createBufferedImage (JFreeChart.java:1399)
    at clover.org.jfree.chart.ChartUtilities.writeChartAsPNG (ChartUtilities.java:211)
    at clover.org.jfree.chart.ChartUtilities.saveChartAsPNG (ChartUtilities.java:341)
    at com.atlassian.clover.reporters.util.CloverChartFactory.generateHistogramChart (CloverChartFactory.java:156)
    at com.atlassian.clover.reporters.html.HtmlReporter.executeCurrentReport (HtmlReporter.java:267)
    at com.atlassian.clover.reporters.html.HtmlReporter.executeImpl (HtmlReporter.java:189)
    at com.atlassian.clover.reporters.CloverReporter.execute (CloverReporter.java:38)
    at com.atlassian.clover.ant.tasks.CloverReportTask.generateReports (CloverReportTask.java:435)
    253543 [WARNING] null
java.lang.NullPointerException
at     com.atlassian.clover.ant.tasks.CloverReportTask.cloverExecuteat (CloverReportTask.java:395)
    at com.atlassian.clover.ant.tasks.AbstractCloverTask.execute (AbstractCloverTask.java:57)
    at org.apache.tools.ant.UnknownElement.execute com.atlassian.clover.reporters.html.RenderFileAction.call (UnknownElement.java:292)
    ...

这是我.gitlab-ci.yml

的相关部分
verify:
  stage: verify
  tags:
    - maven
    - jdk-9
  script:
    - 'mvn clover:setup verify clover:aggregate clover:clover'

而跑步者的 docker 图像是 maven:3-jdk-9-slim

我试过对JVM内存进行微调,但仍然失败,而且我找不到失败的原因。有什么建议吗?

问题与字体配置有关。参见 https://github.com/docker-library/openjdk/issues/73#issuecomment-284526727

在 Debian 上,openjdk-9 缺少对 libfontconfig1

的依赖

在您的 Docker 图像中安装该依赖项,一切都会正常工作。