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

NullPointerException when a dependency uses version range and another uses an actual version incompatible with that range

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2, 2.0.3, 2.0.4
    • 2.0.9
    • Dependencies
    • None
    • Patch

    Description

      Struts 1.2.7 depends on commons-digester 1.6 and jasperreports 1.1.1 in [1.7,)

      Build fails with a null pointer exception that is not very explanatory

      [INFO] Scanning for projects...
      [INFO] ----------------------------------------------------------------------------
      [INFO] Building Unnamed - test:test:jar:1.0-SNAPSHOT
      [INFO] task-segment: [test]
      [INFO] ----------------------------------------------------------------------------
      [INFO] [resources:resources]
      [INFO] Using default encoding to copy filtered resources.
      [INFO] ----------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ----------------------------------------------------------------------------
      [INFO] version was null for commons-digester:commons-digester
      [INFO] ----------------------------------------------------------------------------
      [INFO] Trace
      java.lang.NullPointerException: version was null for commons-digester:commons-digester
      at org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:361)
      at org.apache.maven.artifact.DefaultArtifact.getId(DefaultArtifact.java:222)
      at org.apache.maven.artifact.resolver.ResolutionNode.getDependencyTrail(ResolutionNode.java:115)
      at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:88)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:223)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:211)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:182)
      at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1117)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:366)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
      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:585)
      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)
      [INFO] ----------------------------------------------------------------------------
      [INFO] Total time: 1 second
      [INFO] Finished at: Sun Mar 05 23:26:16 PST 2006
      [INFO] Final Memory: 3M/5M
      [INFO] ----------------------------------------------------------------------------

      Attachments

        1. pom.xml
          0.8 kB
          Carlos Sanchez Gonzalez
        2. MNG-2123-maven-artifact.patch
          20 kB
          Edwin Punzalan
        3. mng2123_versionRangeDependency.tar.bz2
          4 kB
          Martin Goldhahn

        Issue Links

          Activity

            People

              brianf Brian E Fox
              carlos Carlos Sanchez Gonzalez
              Votes:
              17 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 4h Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h
                  8h