Class JavaMainCallerSupport

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<java.lang.String> args  
      protected java.util.List<java.lang.String> env  
      protected java.util.List<java.lang.String> jvmArgs  
      protected java.lang.String mainClassName  
      protected org.apache.maven.plugin.AbstractMojo requester  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected JavaMainCallerSupport​(org.apache.maven.plugin.AbstractMojo requester1, java.lang.String mainClassName1, java.lang.String classpath, java.lang.String[] jvmArgs1, java.lang.String[] args1)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addArgs​(java.lang.String... args1)
      Adds arguments for the process
      void addEnvVar​(java.lang.String key, java.lang.String value)
      Adds an environemnt variable
      void addJvmArgs​(java.lang.String... args0)
      Adds a JVM arg.
      void addOption​(java.lang.String key, boolean value)
      Adds the key if the value is true
      void addOption​(java.lang.String key, java.io.File value)
      Adds an option (key-file pair).
      void addOption​(java.lang.String key, java.lang.String value)
      Adds option (basically two arguments)
      void addToClasspath​(java.io.File entry)  
      void run​(boolean displayCmd)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • requester

        protected org.apache.maven.plugin.AbstractMojo requester
      • env

        protected java.util.List<java.lang.String> env
      • mainClassName

        protected java.lang.String mainClassName
      • jvmArgs

        protected java.util.List<java.lang.String> jvmArgs
      • args

        protected java.util.List<java.lang.String> args
    • Constructor Detail

      • JavaMainCallerSupport

        protected JavaMainCallerSupport​(org.apache.maven.plugin.AbstractMojo requester1,
                                        java.lang.String mainClassName1,
                                        java.lang.String classpath,
                                        java.lang.String[] jvmArgs1,
                                        java.lang.String[] args1)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • addJvmArgs

        public void addJvmArgs​(java.lang.String... args0)
        Description copied from interface: JavaMainCaller
        Adds a JVM arg. Note: This is not available for in-process "forks"
        Specified by:
        addJvmArgs in interface JavaMainCaller
      • addToClasspath

        public void addToClasspath​(java.io.File entry)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addOption

        public void addOption​(java.lang.String key,
                              java.lang.String value)
        Description copied from interface: JavaMainCaller
        Adds option (basically two arguments)
        Specified by:
        addOption in interface JavaMainCaller
      • addOption

        public void addOption​(java.lang.String key,
                              java.io.File value)
        Description copied from interface: JavaMainCaller
        Adds an option (key-file pair). This will pull the absolute path of the file
        Specified by:
        addOption in interface JavaMainCaller
      • addOption

        public void addOption​(java.lang.String key,
                              boolean value)
        Description copied from interface: JavaMainCaller
        Adds the key if the value is true
        Specified by:
        addOption in interface JavaMainCaller
      • addArgs

        public void addArgs​(java.lang.String... args1)
        Description copied from interface: JavaMainCaller
        Adds arguments for the process
        Specified by:
        addArgs in interface JavaMainCaller
      • addEnvVar

        public void addEnvVar​(java.lang.String key,
                              java.lang.String value)
        Description copied from interface: JavaMainCaller
        Adds an environemnt variable
        Specified by:
        addEnvVar in interface JavaMainCaller
      • run

        public void run​(boolean displayCmd)
                 throws java.lang.Exception
        Specified by:
        run in interface JavaMainCaller
        Throws:
        java.lang.Exception