Class JavaMainCallerInProcess

  • All Implemented Interfaces:
    JavaMainCaller

    public class JavaMainCallerInProcess
    extends JavaMainCallerSupport
    This class will call a java main method via reflection.
    Author:
    J. Suereth Note: a -classpath argument *must* be passed into the jvmargs.
    • Constructor Detail

      • JavaMainCallerInProcess

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

      • 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
      • redirectToLog

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