[
http://jira.codehaus.org/browse/MNG-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_98742
]
Graham Leggett commented on MNG-3036:
-------------------------------------
Sorry, I'm being a moron - the debugger was pointing at the wrong code.
The line that is NPEing is this one:
164: resetArtifact.selectVersion( resetArtifact.getVersionRange().matchVersion(
resetArtifact.getAvailableVersions()
).toString() );
Or, to be more specific, the following statement returns null:
resetArtifact.getVersionRange().matchVersion(
resetArtifact.getAvailableVersions() )
which is in turn not handled.
Digging deeper, if I evaluate the expression
resetArtifact.getAvailableVersions() it evaluates to the single entry [3.2.0].
If I evaluate resetArtifact.getVersionRange().toString() it evaluates to "".
Based on this it seems the case of where the list of available versions is not
inside the version range, this case in currently unhandled. I don't know what
the correct way would be to handle this, does anyone know what this code is
trying to do?
> NullPointerException when eclipse jars are marked as "provided"
> ---------------------------------------------------------------
>
> Key: MNG-3036
> URL: http://jira.codehaus.org/browse/MNG-3036
> Project: Maven 2
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 2.0.6
> Reporter: Graham Leggett
> Attachments: pom.xml
>
>
> When a pde artifact is built that transitively depends on some eclipse jars,
> and an attempt is made to filter out those eclipse jars by marking the scope
> as provided, maven NPEs during eclipse:eclipse as follows:
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] null
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:164)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:334)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:334)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:334)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:334)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.recurse(DefaultArtifactCollector.java:334)
> at
> org.apache.maven.artifact.resolver.DefaultArtifactCollector.collect(DefaultArtifactCollector.java:75)
> at
> org.apache.maven.plugin.ide.AbstractIdeSupportMojo.doDependencyResolution(AbstractIdeSupportMojo.java:447)
> at
> org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractIdeSupportMojo.java:398)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
> 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]
> ------------------------------------------------------------------------
> [INFO] Total time: 6 seconds
> [INFO] Finished at: Tue Jun 05 19:00:22 BST 2007
> [INFO] Final Memory: 7M/13M
> [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