Details
-
Type:
Wish
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.0.9
-
Fix Version/s: 0.0.11
-
Component/s: Dependency Resolver
-
Labels:None
-
Number of attachments :
Description
When inserting a dependency (in my case jaxen) which has a dependency of it's own (xercesImpl) to a project that has a parent which has the same dependency (xercesImpl) already declared (scope was system) a NullPointerException emerges to the WTP xml editors topmost row and classpath container doesn't show anymore any of the dependencies. Workspace log file and console did not show any anomalities.
With standalone maven everything work just fine, but with embedder I managed to pull out a following stacktrace
java.lang.NullPointerException
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:82)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:63)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:233)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:211)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:192)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildWithDependencies(DefaultMavenProjectBuilder.java:342)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildWithDependencies(DefaultMavenProjectBuilder.java:289)
at org.apache.maven.embedder.MavenEmbedder.readProjectWithDependencies(MavenEmbedder.java:277)
at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:53)
This seemed very familiar and here's a link <http://jira.codehaus.org/browse/MPIR-2> to another project. This issue has been around for quite a while and despite the status FIXED, I don't think this actually is fixed but at least it has been patched couple of times. Workaround: Add an exclusion clause to the new dependency if you have it's dependencies already declared in parent.
What is left for this project could be a more informative way to express runtime exceptions/errors when embedder fails to do so. NullPointerException in the xml editor gives a wrong expression where the problem actually resides. I'd prefer m2 console over eclipse workspace log.
Issue Links
- relates to
-
MPIR-2
Dependencies report throws NullPointerException when a transitive dependency has system scope
-