Class KieMavenCli


  • public class KieMavenCli
    extends org.apache.maven.cli.MavenCli
    This is an extension of the default MavenCli implementation to allow maven invocation concurrently. The main issues found are: - OptionsBuilder class is not thread safe and thus multiple threads doing doMain will run into race conditions modifying different entries of the options - projectRoot by default is allowed to be set via system properties which does not make sense in concurrent builds env - -D options from arguments of doMain should not be set as system properties as that will corrupt different builds

    This is considered as workaround for the time being ... though it's unclear if we can get these fixed in maven/cli itself.

    • Field Summary

      • Fields inherited from class org.apache.maven.cli.MavenCli

        DEFAULT_GLOBAL_SETTINGS_FILE, DEFAULT_GLOBAL_TOOLCHAINS_FILE, DEFAULT_USER_SETTINGS_FILE, DEFAULT_USER_TOOLCHAINS_FILE, LOCAL_REPO_PROPERTY, MULTIMODULE_PROJECT_DIRECTORY, THREADS_DEPRECATED, userHome, userMavenConfigurationHome
    • Constructor Summary

      Constructors 
      Constructor Description
      KieMavenCli​(String projectRoot)  
    • Constructor Detail

      • KieMavenCli

        public KieMavenCli​(String projectRoot)
    • Method Detail

      • doMain

        public int doMain​(org.apache.maven.cli.CliRequest cliRequest)
        Overrides:
        doMain in class org.apache.maven.cli.MavenCli