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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.4
    • 2.0.5
    • None
    • None

    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)

      Attachments

        Activity

          People

            fgiust Fabrizio Giustina
            fgiust Fabrizio Giustina
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: