Class JavaMainCallerByFork

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

public class JavaMainCallerByFork extends JavaMainCallerSupport
forked java commands.
  • Field Details

    • _forceUseArgFile

      private boolean _forceUseArgFile
    • _javaExec

      private String _javaExec
      Location of java executable.
    • _redirectToLog

      private boolean _redirectToLog
  • Constructor Details

    • JavaMainCallerByFork

      public JavaMainCallerByFork(org.apache.maven.plugin.AbstractMojo requester1, String mainClassName1, String classpath, String[] jvmArgs1, String[] args1, boolean forceUseArgFile, org.apache.maven.toolchain.Toolchain toolchain) throws Exception
      Throws:
      Exception
  • Method Details

    • 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
      Description copied from interface: JavaMainCaller
      run the command without stream redirection nor waiting for exit
      Parameters:
      displayCmd -
      Returns:
      the spawn Process (or null if no process was spawned)
      Throws:
      Exception
    • displayCmd

      private void displayCmd(boolean displayCmd, List<String> cmd)
    • buildCommand

      protected List<String> buildCommand() throws Exception
      Throws:
      Exception
    • tryDeleteArgFile

      private void tryDeleteArgFile(List<String> cmd) throws Exception
      Throws:
      Exception
    • lengthOf

      private long lengthOf(List<String> l, long sepLength) throws Exception
      Throws:
      Exception
    • redirectToLog

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