Skip to content

Commit

Permalink
Only ever return pom path for type=pom
Browse files Browse the repository at this point in the history
This closes #1730
  • Loading branch information
kwin committed Apr 4, 2024
1 parent 5f94521 commit ea9a37e
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
Expand Down

0 comments on commit ea9a37e

Please sign in to comment.