if (isBlank(environmentCNamePrefix) && isBlank(environmentName))
throw new MojoExecutionException("You must declare either cnamePrefix or environmentName");
DescribeEnvironmentsRequest req = new DescribeEnvironmentsRequest()
.withApplicationName(applicationName);
DescribeEnvironmentsResult result = null;
result = getService().describeEnvironments(req);
List<EnvironmentDescription> environments = new ArrayList<EnvironmentDescription>();
boolean bLookupEnvironmentName = isNotBlank(environmentName);
boolean bLookupCnamePrefix = !bLookupEnvironmentName;
String cNameToFind = null;
if (bLookupCnamePrefix) {
cNameToFind = String.format("%s.elasticbeanstalk.com",
environmentCNamePrefix);
getLog().info("Looking up for " + cNameToFind);
}
for (EnvironmentDescription d : result.getEnvironments()) {
if (d.getStatus().startsWith("Termin"))
continue;
boolean bFound = false;
if (bLookupEnvironmentName) {