Maven 2 & 3

Null pointer exeception when introducing version range [major.minor.build-SNAPSHOT,)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.0.6
  • Fix Version/s: 2.0.9
  • Component/s: Dependencies
  • Labels:
    None
  • Environment:
    MAC OS X
  • Complexity:
    Intermediate
  • Number of attachments :
    3

Description

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] ------------------------------------------------------------------------

  1. build.txt
    04/Apr/07 11:52 AM
    32 kB
    Dennis Schafroth
  2. pom.xml
    04/Apr/07 11:52 AM
    4 kB
    Dennis Schafroth
  3. pom.xml
    04/Apr/07 11:52 AM
    3 kB
    Dennis Schafroth

Issue Links

Activity

Hide
Carlos Sanchez added a comment -

Looks a duplicate of MNG-2123

Show
Carlos Sanchez added a comment - Looks a duplicate of MNG-2123
Hide
Brian Fox added a comment -

this is not a dup of MNG-2123

Show
Brian Fox added a comment - this is not a dup of MNG-2123
Hide
Brian Fox added a comment -

Can't reproduce. If this is still occuring in 2.0.8/2.0.9 please reopen with a test project.

Show
Brian Fox added a comment - Can't reproduce. If this is still occuring in 2.0.8/2.0.9 please reopen with a test project.

People

Vote (3)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: