ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Java.java
Date Mon, 15 Mar 2004 11:27:04 GMT
bodewig     2004/03/15 03:27:04

  Modified:    src/main/org/apache/tools/ant/taskdefs Java.java
  Log:
  White-space changes only
  
  Revision  Changes    Path
  1.88      +65 -65    ant/src/main/org/apache/tools/ant/taskdefs/Java.java
  
  Index: Java.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- Java.java	15 Mar 2004 11:23:48 -0000	1.87
  +++ Java.java	15 Mar 2004 11:27:04 -0000	1.88
  @@ -681,41 +681,41 @@
        */
       private int fork(String[] command) throws BuildException {
   
  -            Execute exe
  -                = new Execute(redirector.createHandler(), createWatchdog());
  -            exe.setAntRun(getProject());
  -
  -            if (dir == null) {
  -                dir = getProject().getBaseDir();
  -            } else if (!dir.exists() || !dir.isDirectory()) {
  -                throw new BuildException(dir.getAbsolutePath()
  -                                         + " is not a valid directory",
  -                                         getLocation());
  -            }
  -
  -            exe.setWorkingDirectory(dir);
  -
  -            String[] environment = env.getVariables();
  -            if (environment != null) {
  -                for (int i = 0; i < environment.length; i++) {
  -                    log("Setting environment variable: " + environment[i],
  -                        Project.MSG_VERBOSE);
  -                }
  -            }
  -            exe.setNewenvironment(newEnvironment);
  -            exe.setEnvironment(environment);
  -
  -            exe.setCommandline(command);
  -            try {
  -                int rc = exe.execute();
  -                redirector.complete();
  -                if (exe.killedProcess()) {
  -                    throw new BuildException("Timeout: killed the sub-process");
  -                }
  -                return rc;
  -            } catch (IOException e) {
  -                throw new BuildException(e, getLocation());
  -            }
  +        Execute exe
  +            = new Execute(redirector.createHandler(), createWatchdog());
  +        exe.setAntRun(getProject());
  +
  +        if (dir == null) {
  +            dir = getProject().getBaseDir();
  +        } else if (!dir.exists() || !dir.isDirectory()) {
  +            throw new BuildException(dir.getAbsolutePath()
  +                                     + " is not a valid directory",
  +                                     getLocation());
  +        }
  +
  +        exe.setWorkingDirectory(dir);
  +
  +        String[] environment = env.getVariables();
  +        if (environment != null) {
  +            for (int i = 0; i < environment.length; i++) {
  +                log("Setting environment variable: " + environment[i],
  +                    Project.MSG_VERBOSE);
  +            }
  +        }
  +        exe.setNewenvironment(newEnvironment);
  +        exe.setEnvironment(environment);
  +
  +        exe.setCommandline(command);
  +        try {
  +            int rc = exe.execute();
  +            redirector.complete();
  +            if (exe.killedProcess()) {
  +                throw new BuildException("Timeout: killed the sub-process");
  +            }
  +            return rc;
  +        } catch (IOException e) {
  +            throw new BuildException(e, getLocation());
  +        }
       }
   
       /**
  @@ -723,36 +723,36 @@
        */
       private void spawn(String[] command) throws BuildException {
   
  -            Execute exe
  -                = new Execute();
  -            exe.setAntRun(getProject());
  -
  -            if (dir == null) {
  -                dir = getProject().getBaseDir();
  -            } else if (!dir.exists() || !dir.isDirectory()) {
  -                throw new BuildException(dir.getAbsolutePath()
  -                                         + " is not a valid directory",
  -                                         getLocation());
  -            }
  -
  -            exe.setWorkingDirectory(dir);
  -
  -            String[] environment = env.getVariables();
  -            if (environment != null) {
  -                for (int i = 0; i < environment.length; i++) {
  -                    log("Setting environment variable: " + environment[i],
  -                        Project.MSG_VERBOSE);
  -                }
  -            }
  -            exe.setNewenvironment(newEnvironment);
  -            exe.setEnvironment(environment);
  -
  -            exe.setCommandline(command);
  -            try {
  -                exe.spawn();
  -            } catch (IOException e) {
  -                throw new BuildException(e, getLocation());
  -            }
  +        Execute exe
  +            = new Execute();
  +        exe.setAntRun(getProject());
  +
  +        if (dir == null) {
  +            dir = getProject().getBaseDir();
  +        } else if (!dir.exists() || !dir.isDirectory()) {
  +            throw new BuildException(dir.getAbsolutePath()
  +                                     + " is not a valid directory",
  +                                     getLocation());
  +        }
  +
  +        exe.setWorkingDirectory(dir);
  +
  +        String[] environment = env.getVariables();
  +        if (environment != null) {
  +            for (int i = 0; i < environment.length; i++) {
  +                log("Setting environment variable: " + environment[i],
  +                    Project.MSG_VERBOSE);
  +            }
  +        }
  +        exe.setNewenvironment(newEnvironment);
  +        exe.setEnvironment(environment);
  +
  +        exe.setCommandline(command);
  +        try {
  +            exe.spawn();
  +        } catch (IOException e) {
  +            throw new BuildException(e, getLocation());
  +        }
       }
       /**
        * Executes the given classname with the given arguments as it
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message