@Test public void setDeploymentAllDeploymentNullTest() throws DeploymentException { expectedException.expect(DeploymentException.class); expectedException.expectMessage("No deployment configuration was defined. Aborting."); mojoSpy.setAgentDeployment(null); mojoSpy.setArmDeployment(null); mojoSpy.setCloudHubDeployment(null); mojoSpy.setStandaloneDeployment(null); mojoSpy.setClusterDeployment(null); mojoSpy.getDeploymentConfiguration(); }
protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; } }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }  }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }  @Override void execute(); MavenResolverMetadata getMetadata(); void initializeAnypointDeploymentEnvironment(); }
AbstractMuleDeployerMojo extends AbstractGenericMojo { protected Deployment getDeploymentConfiguration() throws DeploymentException { List<Deployment> deployments = getProjectInformation().getDeployments().stream().filter(Objects::nonNull) .collect(Collectors.toList()); if (deployments.isEmpty()) { throw new DeploymentException("No deployment configuration was defined. Aborting."); } Deployment deploymentConfiguration = deployments.get(0); deploymentConfiguration.setDefaultValues(mavenProject); return deploymentConfiguration; }  @Override void execute(); MavenResolverMetadata getMetadata(); void initializeAnypointDeploymentEnvironment();  }