RawModelReadResult (Project project, VirtualFile file, MavenModel result, Collection<MavenProjectProblem> problems, Set<String> alwaysOnProfiles) { String basedir = getBaseDir(file).toString(); MavenEmbeddersManager manager = MavenProjectsManager.getInstance(project).getEmbeddersManager(); MavenEmbedderWrapper embedder = manager.getEmbedder(MavenEmbeddersManager.FOR_MODEL_READ, basedir); try { result = embedder.readModel(VfsUtilCore.virtualToIoFile(file)); } catch (MavenProcessCanceledException ignore) { } finally { manager.release(embedder); } if (result == null) { result = new MavenModel(); result.setPackaging(MavenConstants.TYPE_JAR); } return new RawModelReadResult(result, problems, alwaysOnProfiles); }