/** * Set up the I/O Redirector. */ @Override protected void setupRedirector() { super.setupRedirector(); redirector.setAppendProperties(true); }
/** * Has the user set all necessary attributes? * @throws BuildException if there are missing required parameters. */ protected void checkConfiguration() throws BuildException { if (cmdl.getExecutable() == null) { throw new BuildException("no executable specified", getLocation()); } if (dir != null && !dir.exists()) { throw new BuildException("The directory " + dir + " does not exist"); } if (dir != null && !dir.isDirectory()) { throw new BuildException(dir + " is not a directory"); } if (spawn && incompatibleWithSpawn) { getProject().log("spawn does not allow attributes related to input, " + "output, error, result", Project.MSG_ERR); getProject().log("spawn also does not allow timeout", Project.MSG_ERR); getProject().log("finally, spawn is not compatible " + "with a nested I/O <redirector>", Project.MSG_ERR); throw new BuildException("You have used an attribute " + "or nested element which is not compatible with spawn"); } setupRedirector(); }