Browse Source

Remove unused method

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270556 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
14da38e484
2 changed files with 0 additions and 70 deletions
  1. +0
    -35
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/Execute.java
  2. +0
    -35
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/exec/Execute.java

+ 0
- 35
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/Execute.java View File

@@ -11,13 +11,10 @@ import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Properties;
import org.apache.avalon.framework.logger.Logger;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.exec.ExecException;
import org.apache.myrmidon.framework.exec.ExecMetaData;
import org.apache.myrmidon.framework.exec.impl.DefaultExecManager;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.Commandline;

/**
* Runs an external program.
@@ -52,38 +49,6 @@ public class Execute
return new File( antHome );
}

/**
* A utility method that runs an external command. Writes the output and
* error streams of the command to the project log.
*
* @param task The task that the command is part of. Used for logging
* @param cmdline The command to execute.
* @throws TaskException if the command does not return 0.
*/
public static void runCommand( final Task task, final String[] cmdline )
throws TaskException
{
try
{
final Logger logger = task.hackGetLogger();
logger.debug( Commandline.toString( cmdline ) );
final Execute exe = new Execute();
exe.setOutput( new LogOutputStream( logger, false ) );
exe.setError( new LogOutputStream( logger, true ) );

exe.setCommandline( cmdline );
int retval = exe.execute();
if( retval != 0 )
{
throw new TaskException( cmdline[ 0 ] + " failed with return code " + retval );
}
}
catch( final IOException ioe )
{
throw new TaskException( "Could not launch " + cmdline[ 0 ] + ": " + ioe );
}
}

/**
* Creates a new execute object.
*


+ 0
- 35
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/exec/Execute.java View File

@@ -11,13 +11,10 @@ import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Properties;
import org.apache.avalon.framework.logger.Logger;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.exec.ExecException;
import org.apache.myrmidon.framework.exec.ExecMetaData;
import org.apache.myrmidon.framework.exec.impl.DefaultExecManager;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.Commandline;

/**
* Runs an external program.
@@ -52,38 +49,6 @@ public class Execute
return new File( antHome );
}

/**
* A utility method that runs an external command. Writes the output and
* error streams of the command to the project log.
*
* @param task The task that the command is part of. Used for logging
* @param cmdline The command to execute.
* @throws TaskException if the command does not return 0.
*/
public static void runCommand( final Task task, final String[] cmdline )
throws TaskException
{
try
{
final Logger logger = task.hackGetLogger();
logger.debug( Commandline.toString( cmdline ) );
final Execute exe = new Execute();
exe.setOutput( new LogOutputStream( logger, false ) );
exe.setError( new LogOutputStream( logger, true ) );

exe.setCommandline( cmdline );
int retval = exe.execute();
if( retval != 0 )
{
throw new TaskException( cmdline[ 0 ] + " failed with return code " + retval );
}
}
catch( final IOException ioe )
{
throw new TaskException( "Could not launch " + cmdline[ 0 ] + ": " + ioe );
}
}

/**
* Creates a new execute object.
*


Loading…
Cancel
Save