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.AbstractMojoStarts SAM for the integration testing.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description protected intsamPortPort for servicing SAM.
-
Constructor Summary
Constructors Constructor Description AbstractStartSamMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyDependencies()Copies in the maven dependencies.DockerNetworkInstancedockerNetwork()Ensure the docker network is created.DockerContainerInstancedynamoDb()Starts DynamoDB.voidensureTemplateYamlFileExists()Ensures the template.yaml file exists.voidsamBuild()Undertakes SAM build.java.lang.ProcesssamLocalStartApi()Starts the local SAM server.java.lang.RunnablestartSam()Starts SAM-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Method Detail
-
ensureTemplateYamlFileExists
public void ensureTemplateYamlFileExists() throws org.apache.maven.plugin.MojoExecutionExceptionEnsures the template.yaml file exists.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
samBuild
public void samBuild() throws org.apache.maven.plugin.MojoExecutionExceptionUndertakes SAM build.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
copyDependencies
public void copyDependencies() throws org.apache.maven.plugin.MojoExecutionExceptionCopies in the maven dependencies.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
dockerNetwork
public DockerNetworkInstance dockerNetwork() throws org.apache.maven.plugin.MojoExecutionException
Ensure the docker network is created.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to create network.
-
dynamoDb
public DockerContainerInstance dynamoDb() throws org.apache.maven.plugin.MojoExecutionException
Starts DynamoDB.- Returns:
DockerContainerInstancefor managing DynamoDB.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to start.
-
samLocalStartApi
public java.lang.Process samLocalStartApi() throws org.apache.maven.plugin.MojoExecutionExceptionStarts the local SAM server.- Returns:
Processfor the local SAM server.- Throws:
org.apache.maven.plugin.MojoExecutionException- If fails to start.
-
startSam
public java.lang.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.
-
-