@@ -0,0 +1,2576 @@
+package br.com.ingenieux.mojo.beanstalk.config;%0D%0A%0D%0A/*%0D%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A * you may not use this file except in compliance with the License.%0D%0A * You may obtain a copy of the License at%0D%0A *%0D%0A *      http://www.apache.org/licenses/LICENSE-2.0%0D%0A *%0D%0A * Unless required by applicable law or agreed to in writing, software%0D%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0D%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0D%0A * See the License for the specific language governing permissions and%0D%0A * limitations under the License.%0D%0A */%0D%0A%0D%0Aimport org.apache.commons.lang.StringUtils;%0D%0Aimport org.apache.maven.plugin.MojoExecutionException;%0D%0Aimport org.apache.maven.plugin.MojoFailureException;%0D%0Aimport org.jfrog.maven.annomojo.annotations.MojoGoal;%0D%0Aimport org.jfrog.maven.annomojo.annotations.MojoParameter;%0D%0Aimport org.jfrog.maven.annomojo.annotations.MojoSince;%0D%0A%0D%0Aimport br.com.ingenieux.mojo.beanstalk.AbstractBeanstalkMojo;%0D%0Aimport br.com.ingenieux.mojo.beanstalk.ConfigurationTemplate;%0D%0A%0D%0Aimport com.amazonaws.services.elasticbeanstalk.model.DeleteConfigurationTemplateRequest;%0D%0A%0D%0A/**%0D%0A * Delete Configuration Template%0D%0A * %0D%0A * @author Aldrin Leal%0D%0A */%0D%0A@MojoGoal(%22delete-configuration-templates%22)%0D%0A@MojoSince(%220.2.7%22)%0D%0Apublic class DeleteConfigurationTemplateMojo extends AbstractBeanstalkMojo %7B%0D%0A%09/**%0D%0A%09 * Beanstalk Application Name%0D%0A%09 */%0D%0A%09@MojoParameter(expression=%22$%7Bbeanstalk.applicationName%7D%22, defaultValue=%22$%7Bproject.artifactId%7D%22, required=true, description=%22Beanstalk Application Name%22)%0D%0A%09String applicationName;%0D%0A%0D%0A%09/**%0D%0A%09 * Configuration Template Name (Optional)%0D%0A%09 */%0D%0A%09@MojoParameter(expression=%22$%7Bbeanstalk.configurationTemplate%7D%22)%0D%0A%09String configurationTemplate;%0D%0A%09%0D%0A%09/**%0D%0A%09 * Configuration Templates%0D%0A%09 */%0D%0A%09@MojoParameter%0D%0A%09ConfigurationTemplate%5B%5D configurationTemplates;%0D%0A%09%0D%0A%09@Override%0D%0A%09protected Object executeInternal() throws MojoExecutionException,%0D%0A%09    MojoFailureException %7B%0D%0A%0D%0A%09%09boolean bConfigurationTemplateDefined = StringUtils%0D%0A%09%09    .isNotBlank(configurationTemplate);%0D%0A%09%09%0D%0A%09%09if (bConfigurationTemplateDefined) %7B%0D%0A%09%09%09deleteConfiguration(configurationTemplate);%0D%0A%09%09%7D else %7B%0D%0A%09%09%09for (ConfigurationTemplate template : configurationTemplates)%0D%0A%09%09%09%09deleteConfiguration(template.getId());%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%09return null;%0D%0A%09%7D%0D%0A%0D%0A%09void deleteConfiguration(String templateName) %7B%0D%0A%09%09%0D%0A%09%09DeleteConfigurationTemplateRequest req = new DeleteConfigurationTemplateRequest(applicationName, templateName);%0D%0A%09%09%0D%0A%09%09getService().deleteConfigurationTemplate(req);%0D%0A  %7D%0D%0A%0D%0A%7D%0D%0A

add a delete configuration template method