Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only ever return pom path for type=pom #1731

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)) {
kwin marked this conversation as resolved.
Show resolved Hide resolved
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
Loading