try {
if (configuration.isAllowInput()) {
project.setDefaultInputStream(System.in);
}
System.setIn(new DemuxInputStream(project));
System.setOut(new PrintStream(new DemuxOutputStream(project, false)));
System.setErr(new PrintStream(new DemuxOutputStream(project, true)));
// make sure that we have a target to execute
if (configuration.getTargets().size() == 0) {
if (project.getDefaultTarget() != null) {
configuration.getTargets().addElement(project.getDefaultTarget());