Maven
  1. Maven
  2. MNG-2746

NPE in DefaultMavenProjectBuilder when parentPath is a directory and pom is not found.

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      DefaultMavenProjectBuilder throws a NPE when it looks for a parent pom specified as a directory path and it can't fint it (it just sets parentDescriptor = null and then call parentDescriptor.getCanonicalFile()

      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] null
      [INFO] ------------------------------------------------------------------------
      [DEBUG] Trace
      java.lang.NullPointerException
      at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:1078)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:674)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:416)
      at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:192)
      at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
      at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:447)
      at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
      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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

        Activity

        Hide
        fabrizio giustina added a comment -

        fixed in 2.0.x branch and trunk

        Show
        fabrizio giustina added a comment - fixed in 2.0.x branch and trunk

          People

          • Assignee:
            fabrizio giustina
            Reporter:
            fabrizio giustina
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: