Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 18 → Rev 45

/xservices/trunk/src/java/net/brutex/xservices/util/RunTask.java
37,8 → 37,10
Project antproject;
Target anttarget;
Task anttask;
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream err = new ByteArrayOutputStream();
ByteArrayOutputStream myout = new ByteArrayOutputStream();
ByteArrayOutputStream myerr = new ByteArrayOutputStream();
PrintStream out = new PrintStream(myout);
PrintStream err = new PrintStream(myerr);
TimestampedLogger log = null;
 
public RunTask(Task anttask) {
47,8 → 49,8
antproject.init();
antproject.setBasedir(System.getProperty("java.io.tmpdir"));
log = new TimestampedLogger();
log.setOutputPrintStream(new PrintStream(out));
log.setErrorPrintStream(new PrintStream(err));
log.setOutputPrintStream(out);
log.setErrorPrintStream(err);
log.setMessageOutputLevel(Echo.EchoLevel.WARN.getLevel());
 
antproject.addBuildListener(log);
79,7 → 81,7
try {
antproject.executeTarget(anttarget.getName());
} catch (BuildException ex) {
new PrintStream(err).println(ex.getMessage());
err.print(ex.getMessage());
returnCode = 1;
}
newMap = antproject.getProperties();
90,8 → 92,8
 
//anttask.execute();
return new ReturnCode(returnCode,
out.toString(),
err.toString(),
myout.toString(),
myerr.toString(),
AntProperty.createAntPropertyList(newMap));
 
}