Maven
  1. Maven
  2. MNG-5157

NPE stemming from DefaultModelBuilder.containsCoordinates

    Details

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

      Description

      [ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
      org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      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 java.lang.String.contains(String.java:2103)
      at org.apache.maven.model.building.DefaultModelBuilder.containsCoordinates(DefaultModelBuilder.java:1047)
      at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:948)
      at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:403)
      at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:374)
      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:536)
      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:542)
      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:328)
      at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:632)
      at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:581)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:233)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      ... 11 more

      I was able to come across this by declaring in a parent POM a dependencyManagement/dependency entry, then in a child POM putting the same dependencyManagement/dependency entry in place, this time w/ "import" scope.

        Activity

        Hide
        Benjamin Bentmann added a comment -

        Fixed in r1158623. What mvn meant to report is that your dependency declaration for the import POM is missing one of the coordinates groupId, artifactId or version.

        Show
        Benjamin Bentmann added a comment - Fixed in r1158623 . What mvn meant to report is that your dependency declaration for the import POM is missing one of the coordinates groupId, artifactId or version.
        Benjamin Bentmann made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Benjamin Bentmann [ bentmann ]
        Fix Version/s 3.0.4 [ 17215 ]
        Resolution Fixed [ 1 ]
        Show
        Andrew Lee Rubinger added a comment - My thanks. https://twitter.com/#!/ALRubinger/status/103784873315143680

          People

          • Assignee:
            Benjamin Bentmann
            Reporter:
            Andrew Lee Rubinger
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: