Skip to content

Commit ea9a37e

Browse files
committed
Only ever return pom path for type=pom
This closes #1730
1 parent 5f94521 commit ea9a37e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/EclipseWorkspaceArtifactRepository.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ protected File resolveAsEclipseProject(String groupId, String artifactId, String
7777

7878
if(context.resolverConfiguration.isResolveWorkspaceProjects()) {
7979
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
80-
IPath file = pom.getLocation();
81-
if(file == null) {
80+
IPath pomFile = pom.getLocation();
81+
if(pomFile == null) {
8282
return ProjectRegistryManager.toJavaIoFile(pom);
8383
}
8484
if(!POM_EXTENSION.equals(extension)) {
@@ -94,12 +94,13 @@ protected File resolveAsEclipseProject(String groupId, String artifactId, String
9494
if(location != null) {
9595
IResource res = root.findMember(location);
9696
if(res != null) {
97-
file = res.getLocation();
97+
return res.getLocation().toFile();
9898
}
9999
}
100+
return null;
101+
} else {
102+
return pomFile.toFile();
100103
}
101-
102-
return file.toFile();
103104
}
104105

105106
return null;

0 commit comments

Comments
 (0)