@Test public void testBuildAndDeploySingleServerTemplateWithExistingGav() { final ServerTemplate serverTemplate = new ServerTemplate(SERVER_TEMPLATE_ID, SERVER_TEMPLATE_NAME); serverTemplate.setMode(KieServerMode.PRODUCTION); when(specManagementServiceMock.listServerTemplates()).thenReturn(new ServerTemplateList(Collections.singletonList(serverTemplate))); when(buildServiceMock.buildAndDeploy(any(Module.class), any(DeploymentMode.class))).thenAnswer(invocationOnMock -> { throw new GAVAlreadyExistsException(); }); runner.run(context); verify(buildDialog).startBuild(); verify(buildDialog).showBusyIndicator(CONSTANTS.Building()); verify(conflictingRepositoriesPopup).show(); }
private void buildAndDeploy(final BuildExecutionContext context, final DeploymentMode deploymentMode) { showBuildMessage(); buildServiceCaller.call((RemoteCallback<BuildResults>) buildResults -> onBuildDeploySuccess(context, buildResults), (ErrorCallback<Message>) (message, throwable) -> { onBuildDeployError(context, throwable); return false; }).buildAndDeploy(context.getModule(), deploymentMode); }
ProductionBuildAndDeployExecutor extends AbstractBuildAndDeployExecutor { private void buildAndDeploy(final BuildExecutionContext context, final DeploymentMode deploymentMode) { showBuildMessage(); buildServiceCaller.call((RemoteCallback<BuildResults>) buildResults -> onBuildDeploySuccess(context, buildResults), (ErrorCallback<Message>) (message, throwable) -> { onBuildDeployError(context, throwable); return false; }).buildAndDeploy(context.getModule(), deploymentMode); } }
ProductionBuildAndDeployExecutor extends AbstractBuildAndDeployExecutor { private void buildAndDeploy(final BuildExecutionContext context, final DeploymentMode deploymentMode) { showBuildMessage(); buildServiceCaller.call((RemoteCallback<BuildResults>) buildResults -> onBuildDeploySuccess(context, buildResults), (ErrorCallback<Message>) (message, throwable) -> { onBuildDeployError(context, throwable); return false; }).buildAndDeploy(context.getModule(), deploymentMode); } ProductionBuildAndDeployExecutor(final Caller<BuildService> buildServiceCaller,
                                            final Event<BuildResults> buildResultsEvent,
                                            final Event<NotificationEvent> notificationEvent,
                                            final BuildDialog buildDialog,
                                            final DeploymentPopup deploymentPopup,
                                            final Caller<SpecManagementService> specManagementService,
                                            final ConflictingRepositoriesPopup conflictingRepositoriesPopup); }
ProductionBuildAndDeployExecutor extends AbstractBuildAndDeployExecutor { private void buildAndDeploy(final BuildExecutionContext context, final DeploymentMode deploymentMode) { showBuildMessage(); buildServiceCaller.call((RemoteCallback<BuildResults>) buildResults -> onBuildDeploySuccess(context, buildResults), (ErrorCallback<Message>) (message, throwable) -> { onBuildDeployError(context, throwable); return false; }).buildAndDeploy(context.getModule(), deploymentMode); } ProductionBuildAndDeployExecutor(final Caller<BuildService> buildServiceCaller,
                                            final Event<BuildResults> buildResultsEvent,
                                            final Event<NotificationEvent> notificationEvent,
                                            final BuildDialog buildDialog,
                                            final DeploymentPopup deploymentPopup,
                                            final Caller<SpecManagementService> specManagementService,
                                            final ConflictingRepositoriesPopup conflictingRepositoriesPopup);  }
ProductionBuildAndDeployExecutor extends AbstractBuildAndDeployExecutor { private void buildAndDeploy(final BuildExecutionContext context, final DeploymentMode deploymentMode) { showBuildMessage(); buildServiceCaller.call((RemoteCallback<BuildResults>) buildResults -> onBuildDeploySuccess(context, buildResults), (ErrorCallback<Message>) (message, throwable) -> { onBuildDeployError(context, throwable); return false; }).buildAndDeploy(context.getModule(), deploymentMode); } ProductionBuildAndDeployExecutor(final Caller<BuildService> buildServiceCaller,
                                            final Event<BuildResults> buildResultsEvent,
                                            final Event<NotificationEvent> notificationEvent,
                                            final BuildDialog buildDialog,
                                            final DeploymentPopup deploymentPopup,
                                            final Caller<SpecManagementService> specManagementService,
                                            final ConflictingRepositoriesPopup conflictingRepositoriesPopup);   }