/** * Forces the fixed timestamp for directories to make sure * classes.jar always get a consistent checksum. */ protected void zipDir(Resource dir, ZipOutputStream zOut, String vPath, int mode, ZipExtraField[] extra) throws IOException { // use wrappedZOut instead of zOut super.zipDir(dir,wrappedZOut,vPath,mode,extra); } };
/** * find the handler and instantiate it if it does not exist yet * @return handler for output and error streams */ protected ExecuteStreamHandler getExecuteStreamHandler() { if (this.executeStreamHandler == null) { setExecuteStreamHandler(new PumpStreamHandler(getOutputStream(), getErrorStream())); } return this.executeStreamHandler; }
/** * Set the title of the generated overview page. * * @param doctitle the Document title. */ public void setDoctitle(final String doctitle) { final Html h = new Html(); h.addText(doctitle); addDoctitle(h); }
private static void unzipExceptClasses(File archive, File destDir, Project prj) { Expand e = new Expand(); e.setProject(prj); e.setTaskType("unzip"); e.setSrc(archive); e.setDest(destDir); PatternSet p = new PatternSet(); p.setExcludes("WEB-INF/classes/"); e.addPatternset(p); e.execute(); }
/** * Do all configuration for an executable that * is common across the {@link #fork(String[])} and * {@link #spawn(String[])} methods. * @param exe executable. * @param command command to execute. */ private void setupExecutable(Execute exe, String[] command) { exe.setAntRun(getProject()); setupWorkingDir(exe); setupEnvironment(exe); setupCommandLine(exe, command); }
public TestNGLogSH(Task task, int outlevel, int errlevel, boolean verbose) { super(new TestNGLogOS(task, outlevel, verbose), new LogOutputStream(task, errlevel)); } }
/** * Create the ExecuteStreamHandler instance that will be used * during execution. * @return <code>ExecuteStreamHandler</code>. * @throws BuildException on error. */ @Override protected ExecuteStreamHandler createHandler() throws BuildException { //if we have a RedirectorElement, return a decoy return (redirectorElement == null) ? super.createHandler() : new PumpStreamHandler(); }
/** * Set the class that starts the doclet used in generating the * documentation. * * @param docletName the name of the doclet class. */ public void setDoclet(final String docletName) { if (doclet == null) { doclet = new DocletInfo(); doclet.setProject(getProject()); } doclet.setName(docletName); }
/** * Add an attribute to the manifest - it is added to the main section. * * @param attribute the attribute to be added. * * @exception ManifestException if the attribute is not valid. */ public void addConfiguredAttribute(Manifest.Attribute attribute) throws ManifestException { checkAttribute(attribute); nestedManifest.addConfiguredAttribute(attribute); }
/** * Reference element identifying a data type to carry * over to the invoked target. * @param r the specified <code>Ant.Reference</code>. * @since Ant 1.5 */ public void addReference(Ant.Reference r) { if (callee == null) { init(); } callee.addReference(r); }
/** * Add a target to the list of targets to invoke. * @param t <code>Ant.TargetElement</code> representing the target. * @since Ant 1.6.3 */ public void addConfiguredTarget(Ant.TargetElement t) { if (callee == null) { init(); } callee.addConfiguredTarget(t); targetSet = true; }
/** * Sets base directory for the archive. * * @param baseDir Base archive directory to set. */ @Override public void setBasedir(File baseDir) { super.setBasedir(baseDir); this.baseDir = baseDir; }
/** * Set the string token to replace; required unless a nested * <code>replacetoken</code> element or the * <code>replacefilterresource</code> attribute is used. * @param token token <code>String</code>. */ public void setToken(String token) { createReplaceToken().addText(token); }
/** * Create links to Javadoc output at the given URL. * @param src the URL to link to */ public void setLink(final String src) { createLink().setHref(src); }
/** * Set the string value to use as token replacement; * optional, default is the empty string "". * @param value replacement value. */ public void setValue(String value) { createReplaceValue().addText(value); }
/** * Adds a fileset. * * <p>All included files will be added as sourcefiles. The task * will automatically add * <code>includes="**/*.java"</code> to the * fileset.</p> * @param fs a file set * @since 1.5 */ public void addFileset(final FileSet fs) { createSourceFiles().add(fs); }
/** * Set up the I/O Redirector. */ @Override protected void setupRedirector() { super.setupRedirector(); redirector.setAppendProperties(true); }