Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1440

NullPointerException in isJavaVersionAtLeast on Java 10

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Duplicate
    • 2.20.1
    • None
    • None
    • None

    Description

      Either download

      https://dist.apache.org/repos/dist/dev/httpcomponents/httpcore-5.0-beta1-RC1/httpcomponents-core-5.0-beta1-src.zip (should be around for another 48 hours)

      or check out the git tag:

      https://github.com/apache/httpcomponents-core/tree/5.0-beta1-RC1

      Then run 'mvn clean install' and you will get:

      [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Summary:
      [INFO]
      [INFO] Apache HttpComponents Core Parent .................. SUCCESS [ 10.369 s]
      [INFO] Apache HttpComponents Core HTTP/1.1 ................ FAILURE [ 38.651 s]
      [INFO] Apache HttpComponents Core HTTP/2 .................. SKIPPED
      [INFO] Apache HttpComponents Core OSGi Bundle ............. SKIPPED
      [INFO] Apache HttpComponents Core Integration Tests ....... SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 50.881 s
      [INFO] Finished at: 2017-11-03T11:05:52-06:00
      [INFO] Final Memory: 42M/142M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project httpcore5: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.: NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test (default-test) on project httpcore5: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
          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-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.20.1:test failed.
          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: java.lang.NullPointerException
          at org.apache.maven.surefire.shade.org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast (SystemUtils.java:1626)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.createSurefireBootDirectoryInTemp (AbstractSurefireMojo.java:2904)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getSurefireTempDir (AbstractSurefireMojo.java:2129)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.getForkConfiguration (AbstractSurefireMojo.java:1967)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider (AbstractSurefireMojo.java:1111)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:954)
          at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:832)
          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)
      [ERROR]
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
      [ERROR]
      [ERROR] After correcting the problems, you can resume the build with the command
      [ERROR]   mvn <goals> -rf :httpcore5
      

      This is addressed in https://issues.apache.org/jira/browse/LANG-1365 which will be included in Apache Commons Lang 3.7.

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              ggregory Gary D. Gregory
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: