File tree 2 files changed +8
-1
lines changed
org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal
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 {
155
155
if (basedir == null || !basedir .isAccessible ()) {
156
156
return aquire ();
157
157
}
158
+ if (basedir .getLocation () == null ) {
159
+ return aquire ();
160
+ }
158
161
File file = basedir .getLocation ().toFile ();
159
162
if (file == null ) {
160
163
return aquire ();
Original file line number Diff line number Diff line change @@ -237,7 +237,11 @@ IFile getPom(IProject project) {
237
237
// XXX sensible handling
238
238
return null ;
239
239
}
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 ();
241
245
Optional <File > pom = IMavenToolbox .of (containerManager .getComponentLookup (baseDir )).locatePom (baseDir );
242
246
return pom .map (pomFile -> {
243
247
IFile file = project .getFile (pomFile .getName ());
You can’t perform that action at this time.
0 commit comments