in maven2-server-impl/src/org/jetbrains/idea/maven/server/embedder/Maven2ServerEmbedderImpl.java [443:467]
public List<MavenGoalExecutionResult> executeGoal(
@NotNull String longRunningTaskId,
@NotNull Collection<MavenGoalExecutionRequest> requests,
@NotNull String goal,
MavenToken token) throws RemoteException {
return requests.stream().map(r -> {
try {
return doExecute(new Executor<MavenGoalExecutionResult>() {
@Override
public @NotNull MavenGoalExecutionResult execute() throws Exception {
MavenExecutionResult result = myImpl
.execute(r.file(), new ArrayList<String>(r.profiles().getEnabledProfiles()), new ArrayList<String>(r.profiles().getDisabledProfiles()), Collections.singletonList(goal), Collections.emptyList(), true,
true);
return new MavenGoalExecutionResult(!result.hasExceptions(), r.file(), new MavenGoalExecutionResult.Folders(),
result.getExceptions().stream().map(e -> MavenProjectProblem.createStructureProblem(r.file().getPath(), e.getMessage())).collect(Collectors.toList()));
}
});
} catch (Throwable e) {
throw wrapToSerializableRuntimeException(e);
}
}).collect(Collectors.toList());
}