Issue Details (XML | Word | Printable)

Key: MNG-2123
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Brian Fox
Reporter: Carlos Sanchez
Votes: 17
Watchers: 11
Operations

If you were logged in you would be able to see more operations.
Maven 2

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

Created: 06/Mar/06 01:36 AM   Updated: 22/Dec/08 03:23 PM  Due: 07/Aug/06
Component/s: Dependencies
Affects Version/s: 2.0.2, 2.0.3, 2.0.4
Fix Version/s: 2.0.9

Time Tracking:
Original Estimate: 4 hours
Original Estimate - 4 hours
Remaining Estimate: 0 minutes
Time Spent - 8 hours
Time Spent: 8 hours
Time Spent - 8 hours

File Attachments: 1. Text File MNG-2123-maven-artifact.patch (20 kB)
2. File mng2123_versionRangeDependency.tar.bz2 (4 kB)
3. XML File pom.xml (0.8 kB)

Issue Links:
Duplicate
 
Related

Complexity: Intermediate
Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
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] ----------------------------------------------------------------------------



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Carlos Sanchez added a comment - 06/Mar/06 01:38 AM
if I add a dependency to commons-digester 1.7 it works

Carlos Sanchez added a comment - 06/Mar/06 01:48 AM
if I add a dependency in 1.6 it breaks, so I can't force a version in my pom

Maven version: 2.0.3-SNAPSHOT
[DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settings\csanchez\.m2\plugin-registry.xml'
[DEBUG] Building Maven global-level plugin registry from: 'c:\apps\maven-2.0.3-SNAPSHOT\conf\plugin-registry.xml'
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - test:test:jar:1.0-SNAPSHOT
[INFO] task-segment: [test]
[INFO] ----------------------------------------------------------------------------
[DEBUG] maven-resources-plugin: resolved to version 2.1 from repository central
[DEBUG] Retrieving parent-POM from the repository for project: null:maven-resources-plugin:maven-plugin:2.1
[DEBUG] maven-compiler-plugin: resolved to version 2.0 from repository central
[DEBUG] Retrieving parent-POM from the repository for project: null:maven-compiler-plugin:maven-plugin:2.0
[DEBUG] maven-surefire-plugin: resolved to version 2.2-SNAPSHOT from local repository
[DEBUG] Skipping disabled repository central
[DEBUG] maven-surefire-plugin: using locally installed snapshot
[DEBUG] Retrieving parent-POM from the repository for project: null:maven-surefire-plugin:maven-plugin:2.2-SNAPSHOT
[DEBUG] maven-surefire-plugin: using locally installed snapshot
[DEBUG] maven-surefire-plugin: using locally installed snapshot
[DEBUG] org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.1:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: org.apache.maven:maven-model:jar:2.0
[DEBUG] org.apache.maven:maven-model:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: null:maven-project:jar:2.0
[DEBUG] org.apache.maven:maven-project:jar:2.0:runtime (selected for runtime)
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:runtime (selected for runtime)
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:runtime (selected for runtime)
[DEBUG] junit:junit:jar:3.8.1:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: org.apache.maven:maven-artifact:jar:2.0
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: org.apache.maven:maven-artifact-manager:jar:2.0
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: org.apache.maven:maven-repository-metadata:jar:2.0
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:runtime (selected for runtime)
[DEBUG] org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: null:maven-profile:jar:2.0
[DEBUG] org.apache.maven:maven-profile:jar:2.0:runtime (selected for runtime)
[DEBUG] commons-io:commons-io:jar:1.0:runtime (selected for runtime)
[DEBUG] Retrieving parent-POM from the repository for project: org.apache.maven:maven-plugin-api:jar:2.0
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:runtime (selected for runtime)
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:2.1:resources' -->
[DEBUG] (f) filters = []
[DEBUG] (f) outputDirectory = C:\Documents and Settings\csanchez\Local Settings\Temp\target\target\classes
[DEBUG] (f) project = org.apache.maven.project.MavenProject@87cd189d
[DEBUG] (f) resources = [org.apache.maven.model.Resource@166aa18]
[DEBUG] – end configuration –
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[DEBUG] test:test:jar:1.0-SNAPSHOT (selected for null)
[DEBUG] struts:struts:jar:1.2.7:compile (selected for compile)
[DEBUG] commons-validator:commons-validator:jar:1.1.4:compile (selected for compile)
[DEBUG] commons-digester:commons-digester:jar:1.6:compile (selected for compile)
[DEBUG] commons-beanutils:commons-beanutils:jar:1.6:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.0:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0:compile (selected for compile)
[DEBUG] xml-apis:xml-apis:jar:1.0.b2:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.0:compile (removed - nearer found: 2.1)
[DEBUG] commons-collections:commons-collections:jar:2.1:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0:compile (removed - nearer found: 1.0.4)
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile (selected for compile)
[DEBUG] commons-fileupload:commons-fileupload:jar:1.0:compile (selected for compile)
[DEBUG] oro:oro:jar:2.0.8:compile (selected for compile)
[DEBUG] commons-chain:commons-chain:jar:1.0:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0.3:compile (removed - nearer found: 1.0.4)
[DEBUG] commons-beanutils:commons-beanutils:jar:1.7.0:compile (removed - nearer found: 1.6)
[DEBUG] antlr:antlr:jar:2.7.2:compile (selected for compile)
[DEBUG] commons-beanutils:commons-beanutils:jar:1.6:compile (removed - nearer found: 1.7.0)
[DEBUG] commons-beanutils:commons-beanutils:jar:1.7.0:compile (selected for compile)
[DEBUG] commons-logging:commons-logging:jar:1.0.3:compile (removed - nearer found: 1.0.4)
[DEBUG] commons-digester:commons-digester:jar:1.6:compile (selected for compile)
[DEBUG] commons-beanutils:commons-beanutils:jar:1.6:compile (removed - nearer found: 1.7.0)
[DEBUG] commons-logging:commons-logging:jar:1.0:compile (removed - nearer found: 1.0.4)
[DEBUG] xml-apis:xml-apis:jar:1.0.b2:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:2.1:compile (selected for compile)
[DEBUG] jasperreports:jasperreports:jar:1.1.1:compile (selected for compile)
[DEBUG] xml-apis:xml-apis:jar:1.3.02:compile (removed - nearer found: 1.0.b2)
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile (setting version to: 1.0.4 from range: [1.0,))
[DEBUG] commons-logging:commons-logging:jar:1.0.4:compile (range restricted from: [1.0,) and: 1.0.4 to: 1.0.4 )
[DEBUG] itext:itext:jar:1.3.1:compile (setting version to: 1.3.1 from range: [1.02b,))
[DEBUG] itext:itext:jar:1.3.1:compile (selected for compile)
[DEBUG] commons-beanutils:commons-beanutils:jar:20030211.134440:compile (setting version to: 20030211.134440 from range: [1.4,))
[DEBUG] commons-beanutils:commons-beanutils:jar:20030211.134440:compile (range restricted from: [1.4,) and: 1.7.0 to: 1.7.0 )
[DEBUG] commons-digester:commons-digester:jar:1.7:compile (setting version to: 1.7 from range: [1.7,))
[DEBUG] commons-digester:commons-digester:jar:1.7:compile (setting version to: 1.7 from range: [1.7,))
[DEBUG] commons-digester:commons-digester:jar:1.7:compile (removed - nearer found: null)
[DEBUG] jfree:jfreechart:jar:1.0.0:compile (setting version to: 1.0.0 from range: [1.0.0,))
[DEBUG] jfree:jfreechart:jar:1.0.0:compile (selected for compile)
[DEBUG] jfree:jcommon:jar:1.0.0:compile (selected for compile)
[DEBUG] junit:junit:jar:3.8:compile (selected for compile)
[DEBUG] junit:junit:jar:3.8:compile (selected for compile)
[DEBUG] eclipse:jdtcore:jar:3.1.0:compile (setting version to: 3.1.0 from range: [3.1.0,))
[DEBUG] eclipse:jdtcore:jar:3.1.0:compile (selected for compile)
[DEBUG] jfree:jcommon:jar:1.0.0:compile (setting version to: 1.0.0 from range: [1.0.0,))
[DEBUG] jfree:jcommon:jar:1.0.0:compile (range restricted from: [1.0.0,) and: 1.0.0 to: 1.0.0 )
[DEBUG] jfree:jcommon:jar:1.0.0:compile (selected for compile)
[DEBUG] commons-collections:commons-collections:jar:20040616:compile (setting version to: 20040616 from range: [2.1,))
[DEBUG] commons-collections:commons-collections:jar:20040616:compile (range restricted from: [2.1,) and: 2.1 to: 2.1 )
[DEBUG] commons-digester: using locally installed snapshot
[DEBUG] Unable to determine the release version

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=commons-digester -DartifactId=commons-digester \
-Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file

Path to dependency:
1) test:test:jar:1.0-SNAPSHOT
2) commons-digester:commons-digester:jar:RELEASE

commons-digester:commons-digester:jar:RELEASE

[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) commons-digester:commons-digester:jar:RELEASE

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=commons-digester -DartifactId=commons-digester \
-Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file

Path to dependency:
1) test:test:jar:1.0-SNAPSHOT
2) commons-digester:commons-digester:jar:RELEASE

----------
1 required artifact is missing.

for artifact:
test:test:jar:1.0-SNAPSHOT

from the specified remote repositories:
central (http://test.maven.codehaus.org/maven2)

[INFO] ----------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Missing:
----------
1) commons-digester:commons-digester:jar:RELEASE

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=commons-digester -DartifactId=commons-digester \
-Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file

Path to dependency:
1) test:test:jar:1.0-SNAPSHOT
2) commons-digester:commons-digester:jar:RELEASE

----------
1 required artifact is missing.

for artifact:
test:test:jar:1.0-SNAPSHOT

from the specified remote repositories:
central (http://test.maven.codehaus.org/maven2)

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:551)
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)
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) commons-digester:commons-digester:jar:RELEASE

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=commons-digester -DartifactId=commons-digester \
-Dversion=RELEASE -Dpackaging=jar -Dfile=/path/to/file

Path to dependency:
1) test:test:jar:1.0-SNAPSHOT
2) commons-digester:commons-digester:jar:RELEASE

----------
1 required artifact is missing.

for artifact:
test:test:jar:1.0-SNAPSHOT

from the specified remote repositories:
central (http://test.maven.codehaus.org/maven2)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:244)
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)
... 16 more
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Mar 05 23:47:54 PST 2006
[INFO] Final Memory: 3M/5M
[INFO] ----------------------------------------------------------------------------


Edwin Punzalan added a comment - 06/Aug/06 09:16 AM
I found the cause of the NPE when a created the unit test for it. Unfortunately, when I tried fixing it, a different unit test failed... meaning it is an expected behavior to return null when the merged restrictions are conflicting. I'll then have to catch the returned null and throw a more informative exception in the calling class.

Edwin Punzalan added a comment - 08/Aug/06 10:31 PM
As Brett suggested, I'm just going to make RELEASE as the default recommendationVersion so that it will be returned for conflicting VersionRanges. I've now made the unit tests pass and will be doing intensive tests on it for the different projects I have.

Edwin Punzalan added a comment - 11/Aug/06 02:47 AM
I'm attaching the patch for this. I changed the default recommendation to RELEASE in case restrict does not find a valid version. Also changed the unit tests, since the tests show that null is expected which causes this bug.

Brian Fox added a comment - 17/Oct/07 10:32 PM
Any one of the voters/watchers care to make an IT for this? http://docs.codehaus.org/display/MAVEN/Creating+a+Maven+Integration+Test

Brian Fox added a comment - 21/Oct/07 11:00 PM
bumping to 2.0.9. If we get IT tests for these before 2.0.8 is final, we can take a look

Brian Fox added a comment - 28/Feb/08 08:23 PM
Making a second call for ITs:
Any one of the voters/watchers care to make an IT for this? http://docs.codehaus.org/display/MAVEN/Creating+a+Maven+Integration+Test

Carlos Sanchez added a comment - 28/Feb/08 09:03 PM
This may have been fixed in trunk, i remember having seen a OverConstrainedVersionException

Carlos Sanchez added a comment - 28/Feb/08 09:05 PM
At least since MNG-3396 was fixed you can use dependencyManagemenr

Martin Goldhahn added a comment - 29/Feb/08 06:21 AM - edited
Integration test.
The test creates two artifacts with a dependency to commons-collection.
artifact-fix requires version 3.2
artifact-range requires version (2.0,3.1.99]

artifact-combined has a dependency on the artifacts above.
In version 2.0.8 the test fails with a NPE


Brian Fox added a comment - 03/Mar/08 12:30 PM

The proposed fix is to return RELEASE as the version if two dependencies at the same level specify incompatible versions (ie 3.2 and (2.0,3.1.99]). Clearly we shouldn't throw an NPE, but returning the RELEASE version feels wrong. First that totally breaks repeatability of a build and second, shouldn't we notify the user with a useful exception instead of guessing anything?

(discussion on @ dev: http://www.nabble.com/Comments-on-MNG-2123-%28version-specification-issues%29-td15810087s177.html)


Carlos Sanchez added a comment - 03/Mar/08 05:46 PM
Tried the pom.xml I've attached the first time and the error is still present in 2.0.9 and 2.1.

The expected behaviour would be to throw an OverConstrainedVersionException


Carlos Sanchez added a comment - 03/Mar/08 05:54 PM
The IT test shows a slightly different stack trace than the original pom uploaded

In 2.0.9-SNAPSHOT

java.lang.NullPointerException
at org.apache.maven.artifact.resolver.ResolutionNode.getTrail(ResolutionNode.java:140)
at org.apache.maven.artifact.resolver.ResolutionNode.filterTrail(ResolutionNode.java:215)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:91)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:297)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:285)
at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1349)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:404)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:331)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:124)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:285)
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)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Mar 03 15:51:57 PST 2008
[INFO] Final Memory: 4M/9M
[INFO] ------------------------------------------------------------------------

In 2.1-SNAPSHOT

java.lang.NullPointerException
at org.apache.maven.artifact.resolver.ResolutionNode.getTrail(ResolutionNode.java:145)
at org.apache.maven.artifact.resolver.ResolutionNode.filterTrail(ResolutionNode.java:224)
at org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:151)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:428)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:399)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:342)
at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1439)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:514)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:501)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentsForProject(DefaultLifecycleExecutor.java:265)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:191)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:149)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:225)
at org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2(MavenEmbedder.java:895)
at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice(MavenEmbedder.java:304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:1)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:176)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
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:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:408)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:351)


Brian Fox added a comment - 05/Mar/08 07:07 PM
Fixed so that the correct version is selected from the range, without shoving RELEASE anywhere. The issue only happened if the first instance of the offending artifact was not a range, but the second instance was. Based on my unit testing, reversing the order of your dependencies in the pom should work around this until 2.0.9