org.kuali.maven.ec2
Class LaunchInstanceMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.kuali.maven.ec2.AbstractEC2Mojo
          extended by org.kuali.maven.ec2.LaunchInstanceMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class LaunchInstanceMojo
extends AbstractEC2Mojo

Connect to EC2 and launch a a single instance configured according to user preferences. By default, the plugin waits until the instance reaches the state of "running" before allowing the build to continue. Once an EC2 instance is "running" Amazon has assigned it a public dns name. The public dns name, the instance id, and the value of the tag "Name" (if that tag is supplied) are stored as the project properties ec2.instance.dns, ec2.instance.id, ec2.instance.name, respectively. If wait is false, the ec2.instance.dns property will not be set since the instance will not have a public dns name by the time the plugin execution completes.


Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
LaunchInstanceMojo()
           
 
Method Summary
 void execute(EC2Utils ec2Utils)
           
 String getAmi()
           
 String getEncoding()
           
 String getKey()
           
protected  com.amazonaws.services.ec2.model.RunInstancesRequest getRunSingleEC2InstanceRequest()
           
 List<String> getSecurityGroups()
           
 String getState()
           
protected  String getString(String location, String encoding)
           
 String getType()
           
 String getUserData()
           
protected  String getUserData(String data, String location, String encoding)
           
 String getUserDataFile()
           
 int getWaitTimeout()
           
 boolean isFilterUserData()
           
 boolean isWait()
           
 void setAmi(String ami)
           
 void setEncoding(String encoding)
           
 void setFilterUserData(boolean filterUserData)
           
 void setKey(String key)
           
 void setSecurityGroups(List<String> securityGroups)
           
 void setState(String state)
           
 void setType(String type)
           
 void setUserData(String userData)
           
 void setUserDataFile(String userDataFile)
           
 void setWait(boolean wait)
           
 void setWaitTimeout(int waitTimeout)
           
 
Methods inherited from class org.kuali.maven.ec2.AbstractEC2Mojo
execute, getAccessKey, getProject, getSecretKey, getTags, isSkip, setAccessKey, setSecretKey, setTags
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LaunchInstanceMojo

public LaunchInstanceMojo()
Method Detail

execute

public void execute(EC2Utils ec2Utils)
             throws org.apache.maven.plugin.MojoExecutionException
Specified by:
execute in class AbstractEC2Mojo
Throws:
org.apache.maven.plugin.MojoExecutionException

getRunSingleEC2InstanceRequest

protected com.amazonaws.services.ec2.model.RunInstancesRequest getRunSingleEC2InstanceRequest()
                                                                                       throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getUserData

protected String getUserData(String data,
                             String location,
                             String encoding)
                      throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getString

protected String getString(String location,
                           String encoding)
                    throws IOException
Throws:
IOException

getAmi

public String getAmi()

setAmi

public void setAmi(String ami)

getKey

public String getKey()

setKey

public void setKey(String key)

getType

public String getType()

setType

public void setType(String type)

getSecurityGroups

public List<String> getSecurityGroups()

setSecurityGroups

public void setSecurityGroups(List<String> securityGroups)

getUserData

public String getUserData()

setUserData

public void setUserData(String userData)

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

isFilterUserData

public boolean isFilterUserData()

setFilterUserData

public void setFilterUserData(boolean filterUserData)

isWait

public boolean isWait()

setWait

public void setWait(boolean wait)

getWaitTimeout

public int getWaitTimeout()

setWaitTimeout

public void setWaitTimeout(int waitTimeout)

getState

public String getState()

setState

public void setState(String state)

getUserDataFile

public String getUserDataFile()

setUserDataFile

public void setUserDataFile(String userDataFile)


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.