File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,9 @@ public IMavenPlexusContainer aquire(IResource basedir) throws Exception {
155155 if (basedir == null || !basedir .isAccessible ()) {
156156 return aquire ();
157157 }
158+ if (basedir .getLocation () == null ) {
159+ return aquire ();
160+ }
158161 File file = basedir .getLocation ().toFile ();
159162 if (file == null ) {
160163 return aquire ();
Original file line number Diff line number Diff line change @@ -237,7 +237,11 @@ IFile getPom(IProject project) {
237237 // XXX sensible handling
238238 return null ;
239239 }
240- File baseDir = project .getLocation ().toFile ();
240+ IPath location = project .getLocation ();
241+ if (location == null ) {
242+ return project .getFile (IMavenConstants .POM_FILE_NAME );
243+ }
244+ File baseDir = location .toFile ();
241245 Optional <File > pom = IMavenToolbox .of (containerManager .getComponentLookup (baseDir )).locatePom (baseDir );
242246 return pom .map (pomFile -> {
243247 IFile file = project .getFile (pomFile .getName ());
You can’t perform that action at this time.
0 commit comments