Class JavaMainCallerInProcess

java.lang.Object
scala_maven_executions.JavaMainCallerSupport
scala_maven_executions.JavaMainCallerInProcess
All Implemented Interfaces:
JavaMainCaller

public class JavaMainCallerInProcess extends JavaMainCallerSupport
This class will call a java main method via reflection.
  • Field Details

  • Constructor Details

    • JavaMainCallerInProcess

      public JavaMainCallerInProcess(org.apache.maven.plugin.AbstractMojo requester, String mainClassName, String classpath, String[] jvmArgs, String[] args) throws Exception
      Throws:
      Exception
  • Method Details

    • addJvmArgs

      public void addJvmArgs(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
      Overrides:
      addJvmArgs in class JavaMainCallerSupport
    • run

      public boolean run(boolean displayCmd, boolean throwFailure) throws Exception
      Description copied from interface: JavaMainCaller
      Runs the JavaMain with all the built up arguments/options
      Throws:
      Exception
    • spawn

      public SpawnMonitor spawn(boolean displayCmd) throws Exception
      spawns a thread to run the method
      Returns:
      the spawn Process (or null if no process was spawned)
      Throws:
      Exception
    • runInternal

      private void runInternal(boolean displayCmd) throws Exception
      Runs the main method of a java class
      Throws:
      Exception
    • redirectToLog

      public void redirectToLog()
      Description copied from interface: JavaMainCaller
      request run to be redirected to maven/requester logger