Maven 2 & 3
  1. Maven 2 & 3
  2. MNG-4776

NPE during build from parent but not from child

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-beta-2
    • Fix Version/s: 3.0-beta-3
    • Component/s: None
    • Labels:
      None
    • Environment:
      MacOS X, JDK 1.6_20
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      The build is a bit large (~50+) modules for me to post, but the rough layout is like so:

      super

      -sub
        -assembly

      As part of the build of super, it fails with the exception below; as part of the build of sub, it succeeds.

      [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
      org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      at org.apache.maven.lifecycle.internal.BuilderCommon.handleBuildError(BuilderCommon.java:140)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:98)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      Caused by: java.lang.NullPointerException
      at org.apache.maven.plugin.DefaultPluginDescriptorCache$CacheKey.<init>(DefaultPluginDescriptorCache.java:148)
      at org.apache.maven.plugin.DefaultPluginDescriptorCache.createKey(DefaultPluginDescriptorCache.java:61)
      at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor(DefaultMavenPluginManager.java:125)
      at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:245)
      at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:199)
      at org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculatorImpl.calculateForkedLifecycle(LifecycleExecutionPlanCalculatorImpl.java:555)
      at org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculatorImpl.calculateForkedExecutions(LifecycleExecutionPlanCalculatorImpl.java:520)
      at org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculatorImpl.setupMojoExections(LifecycleExecutionPlanCalculatorImpl.java:160)
      at org.apache.maven.lifecycle.internal.LifecycleExecutionPlanCalculatorImpl.calculateExecutionPlan(LifecycleExecutionPlanCalculatorImpl.java:123)
      at org.apache.maven.lifecycle.internal.BuilderCommon.resolveBuildPlan(BuilderCommon.java:97)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:82)
      ... 16 more
      [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/InternalErrorException

        Issue Links

          Activity

          Hide
          Paul Brown added a comment -

          Switching the goal to "attached" from "assembly" appears to resolve the issue.

          Show
          Paul Brown added a comment - Switching the goal to "attached" from "assembly" appears to resolve the issue.
          Hide
          Benjamin Bentmann added a comment -

          Can you provide a demo project or at least the full debug log of the build?

          Show
          Benjamin Bentmann added a comment - Can you provide a demo project or at least the full debug log of the build?
          Hide
          Benjamin Bentmann added a comment -

          Fixed in r989222.

          Workaround is to add the missing plugin versions mentioned at the start of the build.

          Show
          Benjamin Bentmann added a comment - Fixed in r989222 . Workaround is to add the missing plugin versions mentioned at the start of the build.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Paul Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: