Class PythonExecMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
de.iip_ecosphere.platform.tools.maven.python.PythonExecMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="exec-python")
public class PythonExecMojo
extends org.apache.maven.plugin.AbstractMojo
Maven Mojo for executing Python programs.
- Author:
- Alexander Weber, SSE, Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate booleanprivate org.apache.maven.shared.model.fileset.FileSetA specificfileSetrule to select files and directories.private org.apache.maven.project.MavenProjectprivate Stringprivate Stringprivate Stringprivate booleanFields 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, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project -
failOnError
@Parameter(property="python-exec.failOnError", defaultValue="true") private boolean failOnError -
skip
@Parameter(property="python-exec.skip", required=false, defaultValue="false") private boolean skip -
python
-
pythonPath
-
pythonFile
-
directory
@Parameter(property="python-exec.directory", required=false, defaultValue="src/test/python/") private String directory -
args
-
pythonArgs
-
fileset
@Parameter(required=false) private org.apache.maven.shared.model.fileset.FileSet filesetA specificfileSetrule to select files and directories.
-
-
Constructor Details
-
PythonExecMojo
public PythonExecMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
composeEnvironment
Composes the environment for the python exec call.- Returns:
- the environment, my be null for none
-
runPython
Running the python file.- Parameters:
cmd- the command to run, shall run a python fileworkingDirectory- the directory of the python tests- Returns:
- The output to add to the other outputs
-