org.kuali.maven.ec2
Class LaunchInstanceMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.kuali.maven.ec2.AbstractEC2Mojo
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.
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
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 |
LaunchInstanceMojo
public LaunchInstanceMojo()
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.