Class AbstractInvokerMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
de.iip_ecosphere.platform.tools.maven.invoker.AbstractInvokerMojo
- All Implemented Interfaces:
de.iip_ecosphere.platform.tools.maven.python.Logger,org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
CompileInvokerMojo,InstallInvokerMojo,InvokeInvokerMojo,PackageInvokerMojo,TestInvokerMojo,ValidateInvokerMojo
public class AbstractInvokerMojo
extends org.apache.maven.plugin.AbstractMojo
implements de.iip_ecosphere.platform.tools.maven.python.Logger
Maven POM invoker plugin. This plugin is largely inspired by the maven-invoker plugin.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classAn implementation of InvocationOutputHandler that captures the output and echoes it to aPrintStream. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate org.apache.maven.shared.model.fileset.FileSetA specificfileSetrule to select files and directories.private Stringprivate booleanprivate Stringprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate Stringprivate Stringprivate booleanprivate booleanprivate org.apache.maven.execution.MavenExecutionRequestprivate Fileprivate org.apache.maven.shared.invoker.Invokerprivate FileTheJAVA_HOMEenvironment variable to use for forked Maven invocations.private FileThe local repository for caching artifacts.private booleanprivate Stringprivate FilemavenExecutable can either be a file relative to${maven.home}/bin/, test project workspace or an absolute file.private FileThe home directory of the Maven installation to use for the forked builds.private booleanprivate booleanprivate booleanprivate booleanprivate Stringprivate Stringprivate Fileprivate org.apache.maven.project.MavenProjectprivate Stringprivate booleanWhether to show errors in the build output.private booleanFlag to enable show mvn version used for running its (cli option : -V,--show-version ).private Fileprivate Stringprivate List<SystemProperty> private intprivate Fileprivate booleanFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.maven.shared.invoker.InvocationRequestCreates a basic invocation request by taking over data.private org.apache.maven.shared.invoker.InvocationRequestCreates the actual invocation request.voiddisable()Disables the execution.voidvoidvoidexecute()private org.apache.maven.shared.model.fileset.FileSetReturns the change tracking file set.voidprivate voidpassThroughEnvSettings(org.apache.maven.shared.invoker.InvocationRequest request) Passes through selected system environment settings.private voidpassThroughSysProperties(org.apache.maven.shared.invoker.InvocationRequest request) Passes through selected system properties.private voidsetAsProperty(Properties sysProperties, String key, String value) Ifvalueis not null, setvalueforkeyinsysProperties.voidMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject project -
invokeGoals
-
invokeProfiles
-
systemProperties
-
localRepositoryPath
The local repository for caching artifacts. -
showVersion
@Parameter(defaultValue="false") private boolean showVersionFlag to enable show mvn version used for running its (cli option : -V,--show-version ). -
showErrors
@Parameter(defaultValue="true") private boolean showErrorsWhether to show errors in the build output. -
javaHome
TheJAVA_HOMEenvironment variable to use for forked Maven invocations. Defaults to the current Java home directory. -
mavenHome
The home directory of the Maven installation to use for the forked builds. Defaults to the current Maven installation. -
mavenExecutable
mavenExecutable can either be a file relative to${maven.home}/bin/, test project workspace or an absolute file. -
timeoutInSeconds
@Parameter(defaultValue="0") private int timeoutInSeconds -
pom
-
offline
@Parameter(defaultValue="${session.offline}") private boolean offline -
execRequest
@Parameter(defaultValue="${session.request}") private org.apache.maven.execution.MavenExecutionRequest execRequest -
oktoMvnHome
-
skipTests
-
mavenTestSkip
@Parameter(property="maven.test.skip", required=false, defaultValue="false") private boolean mavenTestSkip -
unpackForce
@Parameter(property="unpack.force", required=false, defaultValue="false") private boolean unpackForce -
configForce
@Parameter(property="configuration.force", required=false, defaultValue="false") private boolean configForce -
disableJava
@Parameter(property="disableJava", defaultValue="false") private boolean disableJava -
disableJavaTests
@Parameter(property="disableJavaTests", defaultValue="false") private boolean disableJavaTests -
disablePython
@Parameter(property="disablePython", defaultValue="false") private boolean disablePython -
disablePythonTests
@Parameter(property="disablePythonTests", defaultValue="false") private boolean disablePythonTests -
disableBuild
@Parameter(property="disableBuild", defaultValue="false") private boolean disableBuild -
pythonCompileHashDir
-
mavenJavadocSkip
@Parameter(property="maven.javadoc.skip", defaultValue="false") private boolean mavenJavadocSkip -
mavenAssemblySkip
@Parameter(property="maven.assembly.skip", defaultValue="false") private boolean mavenAssemblySkip -
mavenSourceSkip
@Parameter(property="maven.source.skip", defaultValue="false") private boolean mavenSourceSkip -
mavenBuildCacheEnabled
-
enableJavadoc
@Parameter(property="enableJavadoc", defaultValue="false") private boolean enableJavadoc -
debug
@Parameter(property="invoker.debug", defaultValue="false") private boolean debug -
skipIfExists
-
executeIfExists
-
buildId
-
oktoModelParent
-
easyDockerFailOnError
-
easyDockerSkip
-
configTracingLevel
-
changeTracking
@Parameter(required=false) private org.apache.maven.shared.model.fileset.FileSet changeTrackingA specificfileSetrule to select files and directories. -
changeTrackingHashFile
-
touchIfExecuted
@Parameter(property="invoker.touchIfExecuted", required=false, defaultValue="") private File touchIfExecuted -
invoker
@Component private org.apache.maven.shared.invoker.Invoker invoker -
enabled
private boolean enabled
-
-
Constructor Details
-
AbstractInvokerMojo
public AbstractInvokerMojo()
-
-
Method Details
-
disable
public void disable()Disables the execution. -
createBasicInvocationRequest
private org.apache.maven.shared.invoker.InvocationRequest createBasicInvocationRequest()Creates a basic invocation request by taking over data.- Returns:
- the request
-
createInvocationRequest
private org.apache.maven.shared.invoker.InvocationRequest createInvocationRequest()Creates the actual invocation request.- Returns:
- the request
- See Also:
-
setAsProperty
Ifvalueis not null, setvalueforkeyinsysProperties.- Parameters:
sysProperties- the system properties to modifykey- the properties keyvalue- the value, may be null to ignore the call
-
getChangeTrackingFileSet
private org.apache.maven.shared.model.fileset.FileSet getChangeTrackingFileSet()Returns the change tracking file set.- Returns:
- the change tracking file set, if not specified a default one
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
warn
- Specified by:
warnin interfacede.iip_ecosphere.platform.tools.maven.python.Logger
-
error
- Specified by:
errorin interfacede.iip_ecosphere.platform.tools.maven.python.Logger
-
error
- Specified by:
errorin interfacede.iip_ecosphere.platform.tools.maven.python.Logger
-
info
- Specified by:
infoin interfacede.iip_ecosphere.platform.tools.maven.python.Logger
-