Java 类org.apache.tools.ant.types.RedirectorElement 实例源码

项目:ant    文件:AbstractJarSignerTask.java   
/**
 * Create the redirector to use, if any.
 *
 * @return a configured RedirectorElement.
 */
private RedirectorElement createRedirector() {
    RedirectorElement result = new RedirectorElement();
    if (storepass != null) {
        StringBuilder input = new StringBuilder(storepass).append('\n');
        if (keypass != null) {
            input.append(keypass).append('\n');
        }
        result.setInputString(input.toString());
        result.setLogInputString(false);
        // Try to avoid showing password prompts on log output, as they would be confusing.
        LineContainsRegExp filter = new LineContainsRegExp();
        RegularExpression rx = new RegularExpression();
        // TODO only handles English locale, not ja or zh_CN
        rx.setPattern("^(Enter Passphrase for keystore: |Enter key password for .+: )$");
        filter.addConfiguredRegexp(rx);
        filter.setNegate(true);
        result.createErrorFilterChain().addLineContainsRegExp(filter);
    }
    return result;
}
项目:tomcat7    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:lams    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:lazycat    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * 
 * @param redirectorElement
 *            <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:ant    文件:VerifyJar.java   
/**
 * verify our jar files
 * @throws BuildException on error.
 */
@Override
public void execute() throws BuildException {
    //validation logic
    final boolean hasJar = jar != null;

    if (!hasJar && !hasResources()) {
        throw new BuildException(ERROR_NO_SOURCE);
    }

    beginExecution();

    //patch the redirector to save output to a file
    RedirectorElement redirector = getRedirector();
    redirector.setAlwaysLog(true);
    FilterChain outputFilterChain = redirector.createOutputFilterChain();
    outputFilterChain.add(outputCache);

    try {
        Path sources = createUnifiedSourcePath();
        for (Resource r : sources) {
            FileProvider fr = r.as(FileProvider.class);
            verifyOneJar(fr.getFile());
        }
    } finally {
        endExecution();
    }
}
项目:ant    文件:ExecTask.java   
/**
 * Add a <code>RedirectorElement</code> to this task.
 *
 * @param redirectorElement   <code>RedirectorElement</code>.
 * @since Ant 1.6.2
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("cannot have > 1 nested <redirector>s");
    }
    this.redirectorElement = redirectorElement;
    incompatibleWithSpawn = true;
}
项目:ant    文件:Java.java   
/**
 * Add a <code>RedirectorElement</code> to this task.
 * @param redirectorElement   <code>RedirectorElement</code>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("cannot have > 1 nested redirectors");
    }
    this.redirectorElement = redirectorElement;
    incompatibleWithSpawn = true;
}
项目:class-guard    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:apache-tomcat-7.0.57    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:apache-tomcat-7.0.57    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:WBSAirback    文件:BaseRedirectorHelperTask.java   
/**
 * Add a <CODE>RedirectorElement</CODE> to this task.
 * @param redirectorElement   <CODE>RedirectorElement</CODE>.
 */
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    if (this.redirectorElement != null) {
        throw new BuildException("Cannot have > 1 nested <redirector>s");
    } else {
        this.redirectorElement = redirectorElement;
    }
}
项目:ant    文件:AbstractJarSignerTask.java   
/**
 * get the redirector. Non-null between invocations of
 * {@link #beginExecution()} and {@link #endExecution()}
 * @return a redirector or null
 */
public RedirectorElement getRedirector() {
    return redirector;
}
项目:ExpectIt    文件:ExpectExec.java   
/**
 * Always throw an {@link java.lang.UnsupportedOperationException} exception.
 *
 * @param redirectorElement the element
 */
@Override
public void addConfiguredRedirector(RedirectorElement redirectorElement) {
    throw new UnsupportedOperationException("Redirector element is not supported");
}