ant redirector
来源:互联网 发布:淘宝店铺综合评分627 编辑:程序博客网 时间:2024/06/04 23:13
http://ant.apache.org/manual/Types/redirector.html
http://ant.apache.org/manual/index.html
I/O redirection
For many tasks, input and output can be defined in a fairly straightforward fashion. Theexec task, used to execute an external process, stands as a very basic example. The executed process may accept input, produce output, or do either or both depending upon various circumstances. Output may be classified as "output" or as "error output." The <redirector>
type provides a concrete means of redirecting input and output featuring the use ofFile Mappers to specify source (input) and destination (output/error) files.Since Apache Ant 1.6.2
The <redirector>
element accepts the following attributes:
false
.NocreateemptyfilesWhether output and error files should be created even when empty. Defaults totrue
.NooutputpropertyThe name of a property in which the output of the command should be stored. Unless the error stream is redirected to a separate file or stream, this property will include the error output.NoerrorpropertyThe name of a property in which the standard error of the command should be stored.NoinputA file from which the executed command's standard input is taken. This attribute is mutually exclusive with theinputstring attribute.NoinputstringA string which serves as the input stream for the executed command. This attribute is mutually exclusive with theinput attribute.NoinputencodingThe input encoding.NooutputencodingThe output encoding.NoerrorencodingThe error encoding.NoalwayslogAlways send to the log in addition to any other destination. Since Ant 1.6.3.No, default is false
loginputstringControls the display of inputstring's value in log messages. Set tofalse
when sending sensitive data (e.g. passwords) to external processes.Since Ant 1.6.3.No, default is true
Parameters specified as nested elements
inputmapper
A single File Mapper used to redirect process input. Multiple mapping results should concatenate all mapped files as input. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested <inputmapper>
is not compatible with either of the input or inputstring attributes.
outputmapper
A single File Mapper used to redirect process output. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested<outputmapper>
is not compatible with the output attribute.
errormapper
A single File Mapper used to redirect error output. Mapping will ordinarily be performed on a task-specified sourcefile; consult the documentation of the individual task for more details. A nested<errormapper>
is not compatible with the error attribute.
inputfilterchain
A FilterChain can be applied to the process input.
outputfilterchain
A FilterChain can be applied to the process output.
errorfilterchain
A FilterChain can be applied to the error output.
Usage
Tasks known to support I/O redirection:
- Exec
- Apply
- Java
The expected behavior of a <redirector>
is to a great degree dependent on the supporting task. Any possible points of confusion should be noted at the task level.
=======
<exec executable="cat"> <redirector outputproperty="redirector.out" errorproperty="redirector.err" inputstring="blah before blah"> <inputfilterchain> <replacestring from="before" to="after"/> </inputfilterchain> <outputmapper type="merge" to="redirector.out"/> <errormapper type="merge" to="redirector.err"/> </redirector></exec>
Sends the string "blah before blah" to the "cat" executable, using an <inputfilterchain> to replace "before" with "after" on the way in. Output is sent to the file "redirector.out" and stored in a property of the same name. Similarly, error output is sent to a file and a property, both named "redirector.err".
- ant redirector
- Registry Redirector
- Domino Tomcat Redirector
- File System Redirector
- The Smallest TCP Port Redirector
- HTTP-to-HTTPS redirector script (ZZ)
- Zend Framework教程-Zend_Helpers-动作助手-Redirector
- ant
- ant
- Ant
- ant
- ANT
- ANT
- ant
- ant
- ant
- ant
- ant
- Hbernate的主配置文件hibernate.cfg.xml
- 黑龙江省测绘资质单位名录
- C# 开发者最经常犯的 8 个错误
- git使用
- Android 开发技巧之传感器和语音识别
- ant redirector
- android网游开发之socket的简单设计和实现
- 黑马程序员_常用API(2) System&Math及其他类
- IOS开发-需要知道的一些事情
- Linux下nginx支持.htaccess文件实现伪静态的方法!
- centos设置自动获取IP
- windbg调试ASP.NET
- redis的主从复制配置实验
- ※C++随笔※=>☆C++基础☆=>※№C++不定参数的处理实现LOG