ArrayList<MavenServerExecutionResult> (@NotNull LongRunningTask task, @NotNull Collection<File> files, @NotNull List<String> activeProfiles, @NotNull List<String> inactiveProfiles) { try { DependencyTreeResolutionListener listener = new DependencyTreeResolutionListener(myConsoleWrapper); Collection<Maven3ExecutionResult> results = doResolveProject( task, files, activeProfiles, inactiveProfiles, Collections.singletonList(listener) ); ArrayList<MavenServerExecutionResult> list = new ArrayList<>(); results.stream().map(result -> createExecutionResult(result.getPomFile(), result, listener.getRootNode())) .forEachOrdered(list::add); return list; } catch (Exception e) { throw myEmbedder.wrapToSerializableRuntimeException(e); } }