private static void buildArtifacts(@NotNull Project project,
                                     @NotNull List<? extends Artifact> artifacts,
                                     @Nullable Object sessionId,
                                     @NotNull MyNotificationCollector notificationCollector,
                                     boolean forceArtifactBuild) {
    if (!artifacts.isEmpty()) {
      final CompileScope scope = ArtifactCompileScope.createArtifactsScope(project, artifacts, forceArtifactBuild);
      ArtifactsWorkspaceSettings.getInstance(project).setArtifactsToBuild(artifacts);
      ExecutionManagerImpl.EXECUTION_SESSION_ID_KEY.set(scope, sessionId);
      //in external build we can set 'rebuild' flag per target type
      CompilerManager.getInstance(project).make(scope, new MyCompileStatusNotification(notificationCollector));
    }
  }
private static void buildArtifacts(@NotNull Project project,
                                     @NotNull List<? extends Artifact> artifacts,
                                     @Nullable Object sessionId,
                                     @NotNull MyNotificationCollector notificationCollector,
                                     boolean forceArtifactBuild)