aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs/src
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-07-30 18:09:51 +0000
committeracolyer <acolyer>2004-07-30 18:09:51 +0000
commitd8d56afde2f495925faf9111489d0add816c9330 (patch)
tree3620a2bdb842ea2e492852989b2cdec6cdb5d139 /taskdefs/src
parent2e8c6d5cc03281df6a9c55b5dbf2d34dd32a401b (diff)
downloadaspectj-d8d56afde2f495925faf9111489d0add816c9330.tar.gz
aspectj-d8d56afde2f495925faf9111489d0add816c9330.zip
added some commented out debug code that is useful when you want
to get information on a failure in a forking task
Diffstat (limited to 'taskdefs/src')
-rw-r--r--taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
index c049aee5f..1cf3d11d3 100644
--- a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -1310,8 +1310,30 @@ public class AjcTask extends MatchingTask {
protected int execInOtherVM(String[] args) {
try {
Project project = getProject();
- LogStreamHandler handler = new LogStreamHandler(this,
- Project.MSG_INFO, Project.MSG_WARN);
+ LogStreamHandler handler = new LogStreamHandler(this,
+ Project.MSG_INFO, Project.MSG_WARN);
+// replace above two lines with what follows as an aid to debugging when running the unit tests....
+// LogStreamHandler handler = new LogStreamHandler(this,
+// Project.MSG_INFO, Project.MSG_WARN) {
+//
+// ByteArrayOutputStream baos = new ByteArrayOutputStream();
+// /* (non-Javadoc)
+// * @see org.apache.tools.ant.taskdefs.PumpStreamHandler#createProcessOutputPump(java.io.InputStream, java.io.OutputStream)
+// */
+// protected void createProcessErrorPump(InputStream is,
+// OutputStream os) {
+// super.createProcessErrorPump(is, baos);
+// }
+//
+// /* (non-Javadoc)
+// * @see org.apache.tools.ant.taskdefs.LogStreamHandler#stop()
+// */
+// public void stop() {
+// byte[] written = baos.toByteArray();
+// System.err.print(new String(written));
+// super.stop();
+// }
+// };
Execute exe = new Execute(handler);
exe.setAntRun(project);
exe.setWorkingDirectory(project.getBaseDir());