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.AbstractMojo
podman goal base functionality
-
-
Field Summary
Fields Modifier and Type Field Description String
connection
Remote podman connection nameprotected StringBuilder
errorOutput
protected Path
pwd
String
url
Url 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 Process
createProcess(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr)
protected void
createProcess(CommandLine generator, BiConsumer<Integer,String> filter)
protected abstract void
doExecute()
void
execute()
protected void
executeCommand(List<String> command)
protected void
executeCommand(List<String> command, String stdin)
protected void
executeCommand(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr, IntConsumer exitCode)
void
executeCommand(CommandLine generator)
protected void
executeCommand(CommandLine generator, IntConsumer exitCode)
protected ExecutorService
getExecutor()
-
-
-
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.MojoFailureException
org.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.MojoExecutionException
IOException
-
executeCommand
public void executeCommand(CommandLine generator) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
IOException
-
executeCommand
protected void executeCommand(List<String> command) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
IOException
-
executeCommand
protected void executeCommand(List<String> command, String stdin) throws org.apache.maven.plugin.MojoExecutionException, IOException
- Throws:
org.apache.maven.plugin.MojoExecutionException
IOException
-
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.MojoExecutionException
IOException
-
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.MojoExecutionException
IOException
-
createProcess
protected Process createProcess(List<String> command, String stdin, BiConsumer<Integer,String> stdout, BiConsumer<Integer,String> stderr) throws IOException
- Throws:
IOException
-
-