All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kuali.maven.ec2.AbstractEC2Mojo Maven / Gradle / Ivy

package org.kuali.maven.ec2;

import java.util.List;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;

import com.amazonaws.services.ec2.model.Tag;

public abstract class AbstractEC2Mojo extends AbstractMojo {

    /**
     * The Maven project object
     *
     * @parameter expression="${project}"
     * @readonly
     */
    MavenProject project;

    /**
     * List of tags. Tags are name/value pairs and can be supplied in the plugin configuration like this:
* *
     *   <tags>
     *     <tag>
     *       <key>Name</key>
     *       <value>production</value>
     *     </tag>
     *     <tag>
     *       <key>Category</key>
     *       <value>networking</value>
     *     </tag>
     *   </tags>
     * 
* * @parameter */ List tags; /** * The AWS Access Key Id for an account on EC2 * * @parameter expression="${ec2.accessKey}" * @required */ String accessKey; /** * The AWS Secret Access Key for an account on EC2 * * @parameter expression="${ec2.secretKey}" * @required */ String secretKey; protected boolean isSkip() { return false; } public abstract void execute(EC2Utils ec2Utils) throws MojoExecutionException; @Override public void execute() throws MojoExecutionException { if (isSkip()) { getLog().info("Skipping execution"); return; } EC2Utils ec2Utils = EC2Utils.getInstance(accessKey, secretKey); execute(ec2Utils); } public String getAccessKey() { return accessKey; } public void setAccessKey(String accessKey) { this.accessKey = accessKey; } public String getSecretKey() { return secretKey; } public void setSecretKey(String secretKey) { this.secretKey = secretKey; } public MavenProject getProject() { return project; } public List getTags() { return tags; } public void setTags(List tags) { this.tags = tags; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy