Null pointer exeception when introducing version range [major.minor.build-SNAPSHOT,) ------------------------------------------------------------------------------------
Key: MNG-2928 URL: http://jira.codehaus.org/browse/MNG-2928 Project: Maven 2 Issue Type: Bug Components: Dependencies Affects Versions: 2.0.6 Environment: MAC OS X Reporter: Dennis Schafroth Attachments: build.txt, pom.xml, pom.xml Due to selection of "wrong" version of a library (SystemResultDomain 1.0.2), an "hard-limit" was introduced on one project forcing the build to use at least 1.0.4-SNAPSHOT). All others are soft versions, so I dont see an inconsistency. The dependency check fails with: [DEBUG] com.mobilepeople.resultdomain:SystemResultDomain:jar:1.0.2:compile (selected for compile) ... [DEBUG] SystemResultDomain: resolved to version 1.0.4-20070402.154234-1 from repository mobilepeople [DEBUG] com.mobilepeople.resultdomain:SystemResultDomain:jar:1.0.4-SNAPSHOT:compile (setting version to: 1.0.4-SNAPSHOT from range: [1.0.4-SNAPSHOT,) ) [DEBUG] com.mobilepeople.resultdomain:SystemResultDomain:jar:1.0.4-SNAPSHOT:compile (removed - nearer found: null) ... [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] version was null for com.mobilepeople.resultdomain:SystemResultDomain [INFO] ------------------------------------------------------------------------ [DEBUG] Trace java.lang.NullPointerException: version was null for com.mobilepeople.resultdomain:SystemResultDomain at org.apache.maven.artifact.DefaultArtifact.getBaseVersion(DefaultArtifact.java:364) at org.apache.maven.artifact.DefaultArtifact.getId(DefaultArtifact.java:225) at org.apache.maven.artifact.resolver.ResolutionNode.getDependencyTrail(ResolutionNode.java:118) at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:96) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:284) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:272) at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1238) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:397) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) 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] ------------------------------------------------------------------------ -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira