Package net.officefloor.maven
Class AbstractStartSamMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
net.officefloor.maven.AbstractStartSamMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
RunSamMojo,StartSamMojo
public abstract class AbstractStartSamMojo
extends org.apache.maven.plugin.AbstractMojo
Starts SAM for the integration testing.
- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
samPort
@Parameter(required=true, property="sam.port") protected int samPortPort for servicing SAM.
Must be specified so that project is clear on integration test ports. This avoids possible changing default port number.
-
-
Constructor Details
-
AbstractStartSamMojo
public AbstractStartSamMojo()
-
-
Method Details
-
ensureTemplateYamlFileExists
public void ensureTemplateYamlFileExists() throws org.apache.maven.plugin.MojoExecutionExceptionEnsures the template.yaml file exists.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to ensure the template.yaml file exists.
-
samBuild
public void samBuild() throws org.apache.maven.plugin.MojoExecutionExceptionUndertakes SAM build.- Throws:
org.apache.maven.plugin.MojoExecutionException- If the SAM build fails.
-
copyDependencies
public void copyDependencies() throws org.apache.maven.plugin.MojoExecutionExceptionCopies in the maven dependencies.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to copy the dependencies.
-
dockerNetwork
Ensure the docker network is created.- Returns:
DockerNetworkInstance.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to create network.
-
dynamoDb
Starts DynamoDB.- Returns:
DockerContainerInstancefor managing DynamoDB.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to start.
-
samLocalStartApi
Starts the local SAM server.- Returns:
Processfor the local SAM server.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to start.
-
startSam
public Runnable startSam() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionStarts SAM- Returns:
Runnableto stop.- Throws:
org.apache.maven.plugin.MojoExecutionException- If execution issue.org.apache.maven.plugin.MojoFailureException- If failure.
-