Class PodmanGoal
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.honton.chas.podman.maven.plugin.PodmanGoal
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
PodmanBuild,PodmanContainer,PodmanLogin,PodmanPush
public abstract class PodmanGoal extends org.apache.maven.plugin.AbstractMojopodman goal base functionality
-
-
Field Summary
Fields Modifier and Type Field Description StringconnectionRemote podman connection nameprotected StringBuildererrorOutputprotected PathpwdStringurlUrl of podman remote service
-
Constructor Summary
Constructors Constructor Description PodmanGoal()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ProcesscreateProcess(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr)protected voidcreateProcess(CommandLine generator, BiConsumer<Integer,String> filter)protected abstract voiddoExecute()voidexecute()protected voidexecuteCommand(List<String> command)protected voidexecuteCommand(List<String> command, String stdin)protected voidexecuteCommand(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr, IntConsumer exitCode)voidexecuteCommand(CommandLine generator)protected voidexecuteCommand(CommandLine generator, IntConsumer exitCode)protected ExecutorServicegetExecutor()
-
-
-
Field Detail
-
url
@Parameter public String url
Url of podman remote service
-
connection
@Parameter public String connection
Remote podman connection name
-
pwd
protected Path pwd
-
errorOutput
protected StringBuilder errorOutput
-
-
Method Detail
-
execute
public final void execute() throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionException
-
getExecutor
protected ExecutorService getExecutor()
-
doExecute
protected abstract void doExecute() throws org.apache.maven.plugin.MojoExecutionException, IOException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
executeCommand
public void executeCommand(CommandLine generator) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
executeCommand
protected void executeCommand(List<String> command) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
executeCommand
protected void executeCommand(List<String> command, String stdin) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
createProcess
protected void createProcess(CommandLine generator, BiConsumer<Integer,String> filter) throws IOException
- Throws:
IOException
-
executeCommand
protected void executeCommand(CommandLine generator, IntConsumer exitCode) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
executeCommand
protected void executeCommand(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr, IntConsumer exitCode) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
createProcess
protected Process createProcess(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr) throws IOException
- Throws:
IOException
-
-