本文整理汇总了Java中org.apache.tools.ant.types.RedirectorElement类的典型用法代码示例。如果您正苦于以下问题:Java RedirectorElement类的具体用法?Java RedirectorElement怎么用?Java RedirectorElement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RedirectorElement类属于org.apache.tools.ant.types包,在下文中一共展示了RedirectorElement类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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;
}
开发者ID:apache,项目名称:ant,代码行数:26,代码来源:AbstractJarSignerTask.java
示例2: addConfiguredRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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;
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:12,代码来源:BaseRedirectorHelperTask.java
示例3: addConfiguredRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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;
}
}
开发者ID:how2j,项目名称:lazycat,代码行数:14,代码来源:BaseRedirectorHelperTask.java
示例4: execute
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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();
}
}
开发者ID:apache,项目名称:ant,代码行数:32,代码来源:VerifyJar.java
示例5: addConfiguredRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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;
}
开发者ID:apache,项目名称:ant,代码行数:14,代码来源:ExecTask.java
示例6: addConfiguredRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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;
}
开发者ID:apache,项目名称:ant,代码行数:12,代码来源:Java.java
示例7: getRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* get the redirector. Non-null between invocations of
* {@link #beginExecution()} and {@link #endExecution()}
* @return a redirector or null
*/
public RedirectorElement getRedirector() {
return redirector;
}
开发者ID:apache,项目名称:ant,代码行数:9,代码来源:AbstractJarSignerTask.java
示例8: addConfiguredRedirector
import org.apache.tools.ant.types.RedirectorElement; //导入依赖的package包/类
/**
* 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");
}
开发者ID:Alexey1Gavrilov,项目名称:ExpectIt,代码行数:10,代码来源:ExpectExec.java
注:本文中的org.apache.tools.ant.types.RedirectorElement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论