When invoking a number of 'java' tasks, I found it handy being
able to append the output of these tasks to the same log file.
Hence this patch.
Dennis Adams
--- org\apache\tools\ant\taskdefs\Java.java.orig Thu Oct 11 23:58:28 2001
+++ org\apache\tools\ant\taskdefs\Java.java Tue Apr 30 15:34:43 2002
@@ -79,6 +79,7 @@
private File out;
private PrintStream outStream = null;
private boolean failOnError = false;
+ private boolean append = false;
/**
* Do the execution.
@@ -250,6 +251,14 @@
this.out = out;
}
+
+ /**
+ * append to the specified output file
+ */
+ public void setAppend(boolean append){
+ this.append = append;
+ }
+
/**
* -mx or -Xmx depending on VM version
*/
@@ -290,7 +299,7 @@
exe.setSystemProperties(command.getSystemProperties());
if (out != null) {
try {
- outStream = new PrintStream(new FileOutputStream(out));
+ outStream = new PrintStream(new
FileOutputStream(out.getName(),append));
exe.execute(project);
} catch (IOException io) {
throw new BuildException(io, location);
@@ -318,7 +327,7 @@
Project.MSG_WARN),
null);
} else {
- fos = new FileOutputStream(out);
+ fos = new FileOutputStream(out.getName(),append);
exe = new Execute(new PumpStreamHandler(fos), null);
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>