You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/23 00:54:57 UTC
cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers DefaultCommandLauncher.java MacCommandLauncher.java ScriptCommandLauncher.java WinNTCommandLauncher.java
donaldp 01/12/22 15:54:57
Modified: proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers
DefaultCommandLauncher.java MacCommandLauncher.java
ScriptCommandLauncher.java
WinNTCommandLauncher.java
Log:
Convert from using TaskException to ExecException
Revision Changes Path
1.3 +9 -9 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/DefaultCommandLauncher.java
Index: DefaultCommandLauncher.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/DefaultCommandLauncher.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultCommandLauncher.java 2001/12/22 12:37:07 1.2
+++ DefaultCommandLauncher.java 2001/12/22 23:54:57 1.3
@@ -11,8 +11,8 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.exec.CommandLauncher;
+import org.apache.myrmidon.framework.exec.ExecException;
import org.apache.myrmidon.framework.exec.ExecMetaData;
/**
@@ -22,7 +22,7 @@
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
- * @version $Revision: 1.2 $ $Date: 2001/12/22 12:37:07 $
+ * @version $Revision: 1.3 $ $Date: 2001/12/22 23:54:57 $
*/
public class DefaultCommandLauncher
implements CommandLauncher
@@ -56,11 +56,11 @@
* launch the application for some reason. Usually due
* to the command not being fully specified and not in
* the PATH env var.
- * @exception TaskException if the command launcher detects that
+ * @exception ExecException if the command launcher detects that
* it can not execute the native command for some reason.
*/
public Process exec( final ExecMetaData metaData )
- throws IOException, TaskException
+ throws IOException, ExecException
{
if( ExecUtil.isCwd( metaData.getWorkingDirectory() ) )
{
@@ -71,7 +71,7 @@
{
final String message = "Unable to launch native command in a " +
"working directory other than \".\"";
- throw new TaskException( message );
+ throw new ExecException( message );
}
else
{
@@ -85,7 +85,7 @@
* under 1.2.
*/
private Process execJava13( final ExecMetaData metaData )
- throws IOException, TaskException
+ throws IOException, ExecException
{
final Object[] args =
{metaData.getCommand(),
@@ -97,11 +97,11 @@
}
catch( final IllegalAccessException iae )
{
- throw new TaskException( iae.getMessage(), iae );
+ throw new ExecException( iae.getMessage(), iae );
}
catch( final IllegalArgumentException iae )
{
- throw new TaskException( iae.getMessage(), iae );
+ throw new ExecException( iae.getMessage(), iae );
}
catch( final InvocationTargetException ite )
{
@@ -113,7 +113,7 @@
}
else
{
- throw new TaskException( t.getMessage(), t );
+ throw new ExecException( t.getMessage(), t );
}
}
}
1.2 +3 -3 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/MacCommandLauncher.java
Index: MacCommandLauncher.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/MacCommandLauncher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MacCommandLauncher.java 2001/12/21 13:18:30 1.1
+++ MacCommandLauncher.java 2001/12/22 23:54:57 1.2
@@ -9,8 +9,8 @@
import java.io.File;
import java.io.IOException;
-import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.exec.CommandLauncher;
+import org.apache.myrmidon.framework.exec.ExecException;
import org.apache.myrmidon.framework.exec.ExecMetaData;
/**
@@ -22,7 +22,7 @@
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
- * @version $Revision: 1.1 $ $Date: 2001/12/21 13:18:30 $
+ * @version $Revision: 1.2 $ $Date: 2001/12/22 23:54:57 $
*/
public class MacCommandLauncher
implements CommandLauncher
@@ -31,7 +31,7 @@
* Execute the specified native command.
*/
public Process exec( final ExecMetaData metaData )
- throws IOException, TaskException
+ throws IOException, ExecException
{
final File directory = metaData.getWorkingDirectory().getCanonicalFile();
if( ExecUtil.isCwd( directory ) )
1.3 +3 -3 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/ScriptCommandLauncher.java
Index: ScriptCommandLauncher.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/ScriptCommandLauncher.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ScriptCommandLauncher.java 2001/12/22 12:38:54 1.2
+++ ScriptCommandLauncher.java 2001/12/22 23:54:57 1.3
@@ -8,8 +8,8 @@
package org.apache.myrmidon.framework.exec.launchers;
import java.io.IOException;
-import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.exec.CommandLauncher;
+import org.apache.myrmidon.framework.exec.ExecException;
import org.apache.myrmidon.framework.exec.ExecMetaData;
/**
@@ -20,7 +20,7 @@
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
- * @version $Revision: 1.2 $ $Date: 2001/12/22 12:38:54 $
+ * @version $Revision: 1.3 $ $Date: 2001/12/22 23:54:57 $
*/
public class ScriptCommandLauncher
implements CommandLauncher
@@ -59,7 +59,7 @@
* set the working directory.
*/
public Process exec( final ExecMetaData metaData )
- throws IOException, TaskException
+ throws IOException, ExecException
{
// Build the command
final String[] prefix = new String[ m_script.length + 1 ];
1.2 +3 -3 jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/WinNTCommandLauncher.java
Index: WinNTCommandLauncher.java
===================================================================
RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/framework/exec/launchers/WinNTCommandLauncher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WinNTCommandLauncher.java 2001/12/21 13:19:39 1.1
+++ WinNTCommandLauncher.java 2001/12/22 23:54:57 1.2
@@ -8,8 +8,8 @@
package org.apache.myrmidon.framework.exec.launchers;
import java.io.IOException;
-import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.exec.CommandLauncher;
+import org.apache.myrmidon.framework.exec.ExecException;
import org.apache.myrmidon.framework.exec.ExecMetaData;
/**
@@ -18,7 +18,7 @@
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:thomas.haas@softwired-inc.com">Thomas Haas</a>
- * @version $Revision: 1.1 $ $Date: 2001/12/21 13:19:39 $
+ * @version $Revision: 1.2 $ $Date: 2001/12/22 23:54:57 $
*/
public class WinNTCommandLauncher
implements CommandLauncher
@@ -28,7 +28,7 @@
* set the working directory.
*/
public Process exec( final ExecMetaData metaData )
- throws IOException, TaskException
+ throws IOException, ExecException
{
// Use cmd.exe to change to the specified directory before running
// the command
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>