org.scala_tools.maven.executions
Class AbstractJavaMainCaller

java.lang.Object
  extended by org.scala_tools.maven.executions.AbstractJavaMainCaller
All Implemented Interfaces:
JavaMainCaller
Direct Known Subclasses:
AbstractForkedJavaCommand, ReflectionJavaMainCaller

public abstract class AbstractJavaMainCaller
extends Object
implements JavaMainCaller

Abstract helper implementation for JavaMainCaller interface.

Author:
josh

Field Summary
protected  List<String> args
           
protected  List<String> env
           
protected  List<String> jvmArgs
           
protected  boolean logOnly
           
protected  String mainClassName
           
protected  org.apache.maven.plugin.AbstractMojo requester
           
 
Constructor Summary
protected AbstractJavaMainCaller(org.apache.maven.plugin.AbstractMojo requester, String mainClassName, String classpath, String[] jvmArgs, String[] args)
           
 
Method Summary
 void addArgs(String... args)
          Adds arguments for the process
 void addEnvVar(String key, String value)
          Adds an environemnt variable
 void addJvmArgs(String... args)
          Adds a JVM arg.
 void addOption(String key, boolean value)
          Adds the key iff the value is true
 void addOption(String key, File value)
          Adds an option (key-file pair).
 void addOption(String key, String value)
          Adds option (basically two arguments)
 void addToClasspath(File entry)
           
 boolean getLogOnly()
           
 void run(boolean displayCmd)
           
 void setLogOnly(boolean v)
          Sets the process to *only* log errors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.scala_tools.maven.executions.JavaMainCaller
run, spawn
 

Field Detail

logOnly

protected boolean logOnly

requester

protected org.apache.maven.plugin.AbstractMojo requester

env

protected List<String> env

mainClassName

protected String mainClassName

jvmArgs

protected List<String> jvmArgs

args

protected List<String> args
Constructor Detail

AbstractJavaMainCaller

protected AbstractJavaMainCaller(org.apache.maven.plugin.AbstractMojo requester,
                                 String mainClassName,
                                 String classpath,
                                 String[] jvmArgs,
                                 String[] args)
                          throws Exception
Throws:
Exception
Method Detail

addJvmArgs

public void addJvmArgs(String... args)
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(File entry)
                    throws Exception
Throws:
Exception

addOption

public void addOption(String key,
                      String value)
Description copied from interface: JavaMainCaller
Adds option (basically two arguments)

Specified by:
addOption in interface JavaMainCaller

addOption

public void addOption(String key,
                      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(String key,
                      boolean value)
Description copied from interface: JavaMainCaller
Adds the key iff the value is true

Specified by:
addOption in interface JavaMainCaller

addArgs

public void addArgs(String... args)
Description copied from interface: JavaMainCaller
Adds arguments for the process

Specified by:
addArgs in interface JavaMainCaller

addEnvVar

public void addEnvVar(String key,
                      String value)
Description copied from interface: JavaMainCaller
Adds an environemnt variable

Specified by:
addEnvVar in interface JavaMainCaller

run

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

setLogOnly

public void setLogOnly(boolean v)
Description copied from interface: JavaMainCaller
Sets the process to *only* log errors

Specified by:
setLogOnly in interface JavaMainCaller

getLogOnly

public boolean getLogOnly()


Copyright © 2009-2010 Scala Tools. All Rights Reserved.