|
26 | 26 | import org.eclipse.core.resources.IFolder;
|
27 | 27 | import org.eclipse.core.resources.IResourceDelta;
|
28 | 28 | import org.eclipse.core.runtime.CoreException;
|
| 29 | +import org.eclipse.core.runtime.IPath; |
29 | 30 | import org.eclipse.core.runtime.IProgressMonitor;
|
30 | 31 | import org.eclipse.core.runtime.OperationCanceledException;
|
31 | 32 | import org.eclipse.core.runtime.Status;
|
@@ -81,12 +82,15 @@ public void configure(ProjectConfigurationRequest request, IProgressMonitor mon)
|
81 | 82 | if(build != null) {
|
82 | 83 | String directory = build.getDirectory();
|
83 | 84 | if(directory != null) {
|
84 |
| - IContainer container = projectFacade.getProject().getFolder(projectFacade.getProjectRelativePath(directory)); |
85 |
| - if(container != null) { |
86 |
| - if(!container.exists() && container instanceof IFolder folder) { |
87 |
| - M2EUtils.createFolder(folder, true, monitor.newChild(1)); |
88 |
| - } else { |
89 |
| - container.setDerived(true, monitor.newChild(1)); |
| 85 | + IPath targetPath = projectFacade.getProjectRelativePath(directory); |
| 86 | + if (targetPath != null) { |
| 87 | + IContainer container = projectFacade.getProject().getFolder(targetPath); |
| 88 | + if(container != null) { |
| 89 | + if(!container.exists() && container instanceof IFolder folder) { |
| 90 | + M2EUtils.createFolder(folder, true, monitor.newChild(1)); |
| 91 | + } else { |
| 92 | + container.setDerived(true, monitor.newChild(1)); |
| 93 | + } |
90 | 94 | }
|
91 | 95 | }
|
92 | 96 | }
|
|
0 commit comments