Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-7759

java.lang.NullPointerException at org.apache.maven.repository.internal.DefaultModelCache.newInstance (DefaultModelCache.java:37)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.9.1
    • 3.9.2
    • Core
    • None

    Description

      I am using grails-maven-plugin, and the execution fails with Maven version 3.9.1. It works perfectly fine with Maven version 3.8.8.

       

      [ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.4:clean (default-clean) on project XX: Failed to create classpath for Grails execution.: NullPointerException -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.grails:grails-maven-plugin:2.4.4:clean (default-clean) on project XX: Failed to create classpath for Grails execution.
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:347)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create classpath for Grails execution.
          at org.grails.maven.plugin.AbstractGrailsMojo.resolveBuildDependencies (AbstractGrailsMojo.java:585)
          at org.grails.maven.plugin.AbstractGrailsMojo.createExecutionContext (AbstractGrailsMojo.java:380)
          at org.grails.maven.plugin.AbstractGrailsMojo.runGrails (AbstractGrailsMojo.java:371)
          at org.grails.maven.plugin.AbstractGrailsMojo.runGrails (AbstractGrailsMojo.java:334)
          at org.grails.maven.plugin.GrailsCleanMojo.execute (GrailsCleanMojo.java:35)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      Caused by: java.lang.NullPointerException
          at org.apache.maven.repository.internal.DefaultModelCache.newInstance (DefaultModelCache.java:37)
          at org.apache.maven.repository.internal.DefaultModelCacheFactory.createCache (DefaultModelCacheFactory.java:35)
          at org.apache.maven.project.DefaultProjectBuilder.createModelCache (DefaultProjectBuilder.java:1005)
          at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:305)
          at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:295)
          at org.grails.maven.plugin.AbstractGrailsMojo.getPluginProject (AbstractGrailsMojo.java:821)
          at org.grails.maven.plugin.AbstractGrailsMojo.resolveBuildDependencies (AbstractGrailsMojo.java:558)
          at org.grails.maven.plugin.AbstractGrailsMojo.createExecutionContext (AbstractGrailsMojo.java:380)
          at org.grails.maven.plugin.AbstractGrailsMojo.runGrails (AbstractGrailsMojo.java:371)
          at org.grails.maven.plugin.AbstractGrailsMojo.runGrails (AbstractGrailsMojo.java:334)
          at org.grails.maven.plugin.GrailsCleanMojo.execute (GrailsCleanMojo.java:35)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:827)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:272)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:195)
          at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:498)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
      [ERROR]

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              richm123 Rich M
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: