Methods Summary |
---|
public Commandline.Argument | createArg()Add a nested argument element to hand to the deployment tool; optional.
return java.createArg();
|
public Commandline.Argument | createJvmarg()Add a nested argment element to hand to the JVM running the
deployment tool.
Creates a nested arg element.
return java.createJvmarg();
|
public void | deploy()Perform the actual deployment.
For this generic implementation, a JVM is spawned using the
supplied classpath, classname, JVM args, and command line arguments.
java.setClassname(className);
java.setClasspath(getClasspath());
java.setFork(true);
java.setFailonerror(true);
java.execute();
|
public java.lang.String | getClassName()Get the classname attribute.
return className;
|
public org.apache.tools.ant.taskdefs.Java | getJava()get the java attribute.
return java;
|
protected boolean | isActionValid()Determines if the "action" attribute defines a valid action.
Subclasses should determine if the action passed in is
supported by the vendor's deployment tool.
For this generic implementation, the only valid action is "deploy"
return (getTask().getAction().equals(VALID_ACTIONS[0]));
|
public void | setClassName(java.lang.String className)The name of the class to execute to perfom
deployment; required.
Example: "com.foobar.tools.deploy.DeployTool"
this.className = className;
|
public void | setTask(ServerDeploy task)Sets the parent task.
super.setTask(task);
java = new Java(task);
|
public void | validateAttributes()Validates the passed in attributes.
Ensures the className and arguments attribute have been set.
super.validateAttributes();
if (className == null) {
throw new BuildException("The classname attribute must be set");
}
|