Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Tanasenko2014-12-03 17:37:42 -0500
committerAnton Tanasenko2014-12-03 17:37:42 -0500
commit7890f48e186248923e5363c94d2f058eeeb6d8cd (patch)
treec9194d29955ee84cdad1dde40726364bb03c6927 /org.eclipse.m2e.core
parentf1a32aa1a49bfbe3c0d14f932eefc10e98ce9d98 (diff)
downloadm2e-core-7890f48e186248923e5363c94d2f058eeeb6d8cd.tar.gz
m2e-core-7890f48e186248923e5363c94d2f058eeeb6d8cd.tar.xz
m2e-core-7890f48e186248923e5363c94d2f058eeeb6d8cd.zip
453995 NPE in MavenRequiredCapability when version is not specified for
scope=import Change-Id: I442de83237c5395891f030e8fd2d9b9822e1c770 Signed-off-by: Anton Tanasenko <atg.sleepless@gmail.com>
Diffstat (limited to 'org.eclipse.m2e.core')
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java
index 847d7864..bc399d4c 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/DefaultMavenDependencyResolver.java
@@ -117,7 +117,7 @@ public class DefaultMavenDependencyResolver extends AbstractMavenDependencyResol
DependencyManagement dependencyManagement = mavenProject.getOriginalModel().getDependencyManagement();
if(dependencyManagement != null) {
for(org.apache.maven.model.Dependency managedDep : dependencyManagement.getDependencies()) {
- if("pom".equals(managedDep.getType()) && "import".equals(managedDep.getScope())) { //$NON-NLS-1$ $NON-NLS-2$
+ if("pom".equals(managedDep.getType()) && "import".equals(managedDep.getScope()) && managedDep.getVersion() != null) { //$NON-NLS-1$ $NON-NLS-2$
ArtifactKey dependencyKey = new ArtifactKey(managedDep.getGroupId(), managedDep.getArtifactId(),
managedDep.getVersion(), null);
requirements.add(MavenRequiredCapability.createMavenArtifactImport(dependencyKey));

Back to the top