Browse Source

these two get new constructors that do the config, as they get created so often.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277698 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 20 years ago
parent
commit
1821003e3d
2 changed files with 33 additions and 0 deletions
  1. +19
    -0
      src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  2. +14
    -0
      src/main/org/apache/tools/ant/taskdefs/Java.java

+ 19
- 0
src/main/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -24,6 +24,7 @@ import java.util.Vector;
import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task; import org.apache.tools.ant.Task;
import org.apache.tools.ant.ProjectComponent;
import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.Environment; import org.apache.tools.ant.types.Environment;
import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Path;
@@ -72,6 +73,24 @@ public class ExecTask extends Task {
*/ */
private boolean vmLauncher = true; private boolean vmLauncher = true;



/**
* Create an instance.
* Needs to be configured by binding to a project.
*/
public ExecTask() {
}

/**
* create an instance that is helping another task.
* Project, OwningTarget, TaskName and description are all
* pulled out
* @param owner task that we belong to
*/
public ExecTask(Task owner) {
bindToOwner(owner);
}

/** /**
* Set whether or not you want the process to be spawned. * Set whether or not you want the process to be spawned.
* Default is false. * Default is false.


+ 14
- 0
src/main/org/apache/tools/ant/taskdefs/Java.java View File

@@ -73,6 +73,20 @@ public class Java extends Task {
private boolean spawn = false; private boolean spawn = false;
private boolean incompatibleWithSpawn = false; private boolean incompatibleWithSpawn = false;


/**
* Normal constructor
*/
public Java() {
}

/**
* create a bound task
* @param owner owner
*/
public Java(Task owner) {
bindToOwner(owner);
}

/** /**
* Do the execution. * Do the execution.
* @throws BuildException if failOnError is set to true and the application * @throws BuildException if failOnError is set to true and the application


Loading…
Cancel
Save