From ea9a37e07099139b0945f0f582852c9466508b6c Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Thu, 4 Apr 2024 21:07:55 +0200 Subject: [PATCH 1/2] Only ever return pom path for type=pom This closes #1730 --- .../registry/EclipseWorkspaceArtifactRepository.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java index d2605a6f2..1b1d51d6a 100644 --- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java +++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java @@ -77,8 +77,8 @@ protected File resolveAsEclipseProject(String groupId, String artifactId, String if(context.resolverConfiguration.isResolveWorkspaceProjects()) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - IPath file = pom.getLocation(); - if(file == null) { + IPath pomFile = pom.getLocation(); + if(pomFile == null) { return ProjectRegistryManager.toJavaIoFile(pom); } if(!POM_EXTENSION.equals(extension)) { @@ -94,12 +94,13 @@ protected File resolveAsEclipseProject(String groupId, String artifactId, String if(location != null) { IResource res = root.findMember(location); if(res != null) { - file = res.getLocation(); + return res.getLocation().toFile(); } } + return null; + } else { + return pomFile.toFile(); } - - return file.toFile(); } return null; From c6b72f79d386996059f83f3883a09dd24a6df1d8 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Thu, 4 Apr 2024 21:44:48 +0200 Subject: [PATCH 2/2] Update version --- org.eclipse.m2e.core/META-INF/MANIFEST.MF | 2 +- org.eclipse.m2e.core/pom.xml | 2 +- org.eclipse.m2e.feature/feature.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.eclipse.m2e.core/META-INF/MANIFEST.MF b/org.eclipse.m2e.core/META-INF/MANIFEST.MF index 75a779490..aead1fa93 100644 --- a/org.eclipse.m2e.core/META-INF/MANIFEST.MF +++ b/org.eclipse.m2e.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.m2e.core;singleton:=true -Bundle-Version: 2.6.0.qualifier +Bundle-Version: 2.6.1.qualifier Bundle-Activator: org.eclipse.m2e.core.internal.MavenPluginActivator Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin diff --git a/org.eclipse.m2e.core/pom.xml b/org.eclipse.m2e.core/pom.xml index da28175d6..fc9ab355b 100644 --- a/org.eclipse.m2e.core/pom.xml +++ b/org.eclipse.m2e.core/pom.xml @@ -19,7 +19,7 @@ org.eclipse.m2e.core - 2.6.0-SNAPSHOT + 2.6.1-SNAPSHOT eclipse-plugin Maven Integration for Eclipse Core Plug-in diff --git a/org.eclipse.m2e.feature/feature.xml b/org.eclipse.m2e.feature/feature.xml index 97f0d2ca9..78f6c1631 100644 --- a/org.eclipse.m2e.feature/feature.xml +++ b/org.eclipse.m2e.feature/feature.xml @@ -2,7 +2,7 @@