Browse Source

Remove failOnError attribute from Exec and thus always fail

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270344 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
f7d4b3cd19
10 changed files with 8 additions and 16 deletions
  1. +3
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  2. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
  3. +0
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SignJar.java
  4. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
  5. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java
  6. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
  7. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GenerateKey.java
  8. +0
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SignJar.java
  9. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Cab.java
  10. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java

+ 3
- 3
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -140,7 +140,7 @@ public class ExecuteOn extends ExecTask
{ {
throw new TaskException( getName() + " doesn\'t support multiple srcfile elements." ); throw new TaskException( getName() + " doesn\'t support multiple srcfile elements." );
} }
srcFilePos = cmdl.createMarker();
srcFilePos = getCommand().createMarker();
return srcFilePos; return srcFilePos;
} }


@@ -157,7 +157,7 @@ public class ExecuteOn extends ExecTask
{ {
throw new TaskException( getName() + " doesn\'t support multiple targetfile elements." ); throw new TaskException( getName() + " doesn\'t support multiple targetfile elements." );
} }
targetFilePos = cmdl.createMarker();
targetFilePos = getCommand().createMarker();
srcIsFirst = ( srcFilePos != null ); srcIsFirst = ( srcFilePos != null );
return targetFilePos; return targetFilePos;
} }
@@ -205,7 +205,7 @@ public class ExecuteOn extends ExecTask
String[] targetFiles = new String[ targets.size() ]; String[] targetFiles = new String[ targets.size() ];
targetFiles = (String[])targets.toArray( targetFiles ); targetFiles = (String[])targets.toArray( targetFiles );


String[] orig = cmdl.getCommandline();
String[] orig = getCommand().getCommandline();
String[] result = new String[ orig.length + srcFiles.length + targetFiles.length ]; String[] result = new String[ orig.length + srcFiles.length + targetFiles.length ];


int srcIndex = orig.length; int srcIndex = orig.length;


+ 0
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java View File

@@ -238,7 +238,6 @@ public class GenerateKey
cmd.createArg().setValue( "" + validity ); cmd.createArg().setValue( "" + validity );
} }


cmd.setFailonerror( true );
cmd.execute(); cmd.execute();
} }




+ 0
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SignJar.java View File

@@ -328,9 +328,7 @@ public class SignJar extends Task
cmd.createArg().setValue( alias ); cmd.createArg().setValue( alias );


getLogger().info( "Signing Jar : " + jarSource.getAbsolutePath() ); getLogger().info( "Signing Jar : " + jarSource.getAbsolutePath() );
cmd.setFailonerror( true );
cmd.execute(); cmd.execute();
} }

} }



+ 0
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java View File

@@ -153,7 +153,6 @@ public class Cab extends MatchingTask
File outFile = null; File outFile = null;


// die if cabarc fails // die if cabarc fails
exec.setFailonerror( true );
exec.setDir( baseDir ); exec.setDir( baseDir );


if( !doVerbose ) if( !doVerbose )


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Chmod.java View File

@@ -163,7 +163,7 @@ public class Chmod extends ExecuteOn
Execute execute = prepareExec(); Execute execute = prepareExec();
try try
{ {
execute.setCommandline( cmdl.getCommandline() );
execute.setCommandline( getCommand().getCommandline() );
runExecute( execute ); runExecute( execute );
} }
catch( IOException e ) catch( IOException e )


+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -140,7 +140,7 @@ public class ExecuteOn extends ExecTask
{ {
throw new TaskException( getName() + " doesn\'t support multiple srcfile elements." ); throw new TaskException( getName() + " doesn\'t support multiple srcfile elements." );
} }
srcFilePos = cmdl.createMarker();
srcFilePos = getCommand().createMarker();
return srcFilePos; return srcFilePos;
} }


@@ -157,7 +157,7 @@ public class ExecuteOn extends ExecTask
{ {
throw new TaskException( getName() + " doesn\'t support multiple targetfile elements." ); throw new TaskException( getName() + " doesn\'t support multiple targetfile elements." );
} }
targetFilePos = cmdl.createMarker();
targetFilePos = getCommand().createMarker();
srcIsFirst = ( srcFilePos != null ); srcIsFirst = ( srcFilePos != null );
return targetFilePos; return targetFilePos;
} }
@@ -205,7 +205,7 @@ public class ExecuteOn extends ExecTask
String[] targetFiles = new String[ targets.size() ]; String[] targetFiles = new String[ targets.size() ];
targetFiles = (String[])targets.toArray( targetFiles ); targetFiles = (String[])targets.toArray( targetFiles );


String[] orig = cmdl.getCommandline();
String[] orig = getCommand().getCommandline();
String[] result = new String[ orig.length + srcFiles.length + targetFiles.length ]; String[] result = new String[ orig.length + srcFiles.length + targetFiles.length ];


int srcIndex = orig.length; int srcIndex = orig.length;


+ 0
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GenerateKey.java View File

@@ -238,7 +238,6 @@ public class GenerateKey
cmd.createArg().setValue( "" + validity ); cmd.createArg().setValue( "" + validity );
} }


cmd.setFailonerror( true );
cmd.execute(); cmd.execute();
} }




+ 0
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SignJar.java View File

@@ -328,9 +328,7 @@ public class SignJar extends Task
cmd.createArg().setValue( alias ); cmd.createArg().setValue( alias );


getLogger().info( "Signing Jar : " + jarSource.getAbsolutePath() ); getLogger().info( "Signing Jar : " + jarSource.getAbsolutePath() );
cmd.setFailonerror( true );
cmd.execute(); cmd.execute();
} }

} }



+ 0
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Cab.java View File

@@ -153,7 +153,6 @@ public class Cab extends MatchingTask
File outFile = null; File outFile = null;


// die if cabarc fails // die if cabarc fails
exec.setFailonerror( true );
exec.setDir( baseDir ); exec.setDir( baseDir );


if( !doVerbose ) if( !doVerbose )


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Chmod.java View File

@@ -163,7 +163,7 @@ public class Chmod extends ExecuteOn
Execute execute = prepareExec(); Execute execute = prepareExec();
try try
{ {
execute.setCommandline( cmdl.getCommandline() );
execute.setCommandline( getCommand().getCommandline() );
runExecute( execute ); runExecute( execute );
} }
catch( IOException e ) catch( IOException e )


Loading…
Cancel
Save