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
  • Field Details

    • project

      @Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject project
    • invokeGoals

      @Parameter(required=true) private List<String> invokeGoals
    • invokeProfiles

      @Parameter private List<String> invokeProfiles
    • systemProperties

      @Parameter private List<SystemProperty> systemProperties
    • localRepositoryPath

      @Parameter(defaultValue="${settings.localRepository}") private File localRepositoryPath
      The local repository for caching artifacts.
    • showVersion

      @Parameter(defaultValue="false") private boolean showVersion
      Flag to enable show mvn version used for running its (cli option : -V,--show-version ).
    • showErrors

      @Parameter(defaultValue="true") private boolean showErrors
      Whether to show errors in the build output.
    • javaHome

      @Parameter private File javaHome
      The JAVA_HOME environment variable to use for forked Maven invocations. Defaults to the current Java home directory.
    • mavenHome

      @Parameter private File mavenHome
      The home directory of the Maven installation to use for the forked builds. Defaults to the current Maven installation.
    • mavenExecutable

      @Parameter private File 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

      @Parameter private File pom
    • offline

      @Parameter(defaultValue="${session.offline}") private boolean offline
    • execRequest

      @Parameter(defaultValue="${session.request}") private org.apache.maven.execution.MavenExecutionRequest execRequest
    • oktoMvnHome

      @Parameter(property="okto.mvn.home", required=false) private String oktoMvnHome
    • skipTests

      @Parameter(property="skipTests", required=false) private String 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

      @Parameter(property="python-compile.hashDir", defaultValue="") private String 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

      @Parameter(property="maven.build.cache.enabled") private String mavenBuildCacheEnabled
    • enableJavadoc

      @Parameter(property="enableJavadoc", defaultValue="false") private boolean enableJavadoc
    • debug

      @Parameter(property="invoker.debug", defaultValue="false") private boolean debug
    • skipIfExists

      @Parameter(property="invoker.skipIfExists", defaultValue="") private File skipIfExists
    • executeIfExists

      @Parameter(property="invoker.executeIfExists", defaultValue="") private File executeIfExists
    • buildId

      @Parameter(property="iip.ciBuildId", defaultValue="") private String buildId
    • oktoModelParent

      @Parameter(property="okto.test.easy.model.parent", defaultValue="") private String oktoModelParent
    • easyDockerFailOnError

      @Parameter(property="easy.docker.failOnError") private String easyDockerFailOnError
    • easyDockerSkip

      @Parameter(property="easy.docker.skip") private String easyDockerSkip
    • configTracingLevel

      @Parameter(property="configuration.tracingLevel") private String configTracingLevel
    • changeTracking

      @Parameter(required=false) private org.apache.maven.shared.model.fileset.FileSet changeTracking
      A specific fileSet rule to select files and directories.
    • changeTrackingHashFile

      @Parameter(required=false) private String 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:
    • passThroughSysProperties

      private void passThroughSysProperties(org.apache.maven.shared.invoker.InvocationRequest request)
      Passes through selected system properties.
      Parameters:
      request - the request to modify as a side effect
    • setAsProperty

      private void setAsProperty(Properties sysProperties, String key, String value)
      If value is not null, set value for key in sysProperties.
      Parameters:
      sysProperties - the system properties to modify
      key - the properties key
      value - the value, may be null to ignore the call
    • passThroughEnvSettings

      private void passThroughEnvSettings(org.apache.maven.shared.invoker.InvocationRequest request)
      Passes through selected system environment settings.
      Parameters:
      request - the request to modify as a side effect
    • 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:
      execute in interface org.apache.maven.plugin.Mojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException
    • warn

      public void warn(String warning)
      Specified by:
      warn in interface de.iip_ecosphere.platform.tools.maven.python.Logger
    • error

      public void error(String error)
      Specified by:
      error in interface de.iip_ecosphere.platform.tools.maven.python.Logger
    • error

      public void error(Throwable throwable)
      Specified by:
      error in interface de.iip_ecosphere.platform.tools.maven.python.Logger
    • info

      public void info(String info)
      Specified by:
      info in interface de.iip_ecosphere.platform.tools.maven.python.Logger