xworker.ant.file.copy/@mapper
事物 mapper(mapper)点击打开事物点击浏览描述

父事物:
copy
描述者:
事物
thing
继承:
mapper

字段摘要
           String classname
           specifies the implementation by class name.
           String classpath
           the classpath to use when looking up classname.
           String classpathref
           the classpath to use, given as reference to a path defined elsewhere.
           String from
           the from attribute for the given implementation.
           String id
           
           String idref
           
           String to
           the to attribute for the given implementation.
           String type
           
 
方法摘要
           toString
          
 
子事物摘要
           chainedmapper
          This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to the first nested mapper, its results to the second, and so on. The target filenames generated by the last nested mapper comprise the ultimate results of the mapping operation. The to and from attributes are ignored.
           compositemapper
          

This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to each nested <mapper> in turn, returning all results. The to and from attributes are ignored.

           cutdirsmapper
          This mapper strips a configured number of leading directories from the source file name.
           filtermapper
          This mapper implementation applies a filterchain to the source file name.
           firstmatchmapper
          This mapper supports an arbitrary number of nested mappers and returns the results of the first mapper that matches. This is different from composite mapper which collects the results of all matching children.
           flattenmapper
          The target file name is identical to the source file name, with all leading directory information stripped off. Both to and fromwill be ignored.
           globmapper
          Both to and from are required and define patterns that may contain at most one *. For each source file that matches the frompattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.
           identitymapper
          The target file name is identical to the source file name. Both to and from will be ignored.
           mergemapper
          The target file name will always be the same, as defined by to - from will be ignored.
           packagemapper
          

Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder. This mapper is particularly useful in combination with <uptodate> and <junit> output.

           regexpmapper
          

Both to and from are required and define regular expressions. If the source file name (as a whole or in part) matches the frompattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. The to pattern determines the whole file name, so if you wanted to replace the extension of a file you should not use from="\.old$" to=".new" but rather from="(.*)\.old$" to="\1.new" (or rather use a glob mapper in this case).

           scriptmapper
          

This mapper executes a script written in Apache BSF or JSR 223 supported language, once per file to map.

           unpackagemapper
          

This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.

 
字段详细信息

classname点击打开事物

specifies the implementation by class name.


classpath点击打开事物

the classpath to use when looking up classname.


classpathref点击打开事物

the classpath to use, given as reference to a path defined elsewhere.


from点击打开事物

the from attribute for the given implementation.


id点击打开事物


idref点击打开事物


to点击打开事物

the to attribute for the given implementation.


type点击打开事物


 
方法详细信息

toString


 
子事物详细信息

chainedmapper点击打开事物

This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to the first nested mapper, its results to the second, and so on. The target filenames generated by the last nested mapper comprise the ultimate results of the mapping operation. The to and from attributes are ignored.


compositemapper点击打开事物

This mapper implementation can contain multiple nested mappers. File mapping is performed by passing the source filename to each nested <mapper> in turn, returning all results. The to and from attributes are ignored.

Starting with Ant 1.8.0 the order of the mapped results is the same as the order of the nested mappers; prior to Ant 1.8.0 the order has been undefined.


cutdirsmapper点击打开事物

This mapper strips a configured number of leading directories from the source file name.


filtermapper点击打开事物

This mapper implementation applies a filterchain to the source file name.


firstmatchmapper点击打开事物

This mapper supports an arbitrary number of nested mappers and returns the results of the first mapper that matches. This is different from composite mapper which collects the results of all matching children.


flattenmapper点击打开事物

The target file name is identical to the source file name, with all leading directory information stripped off. Both to and fromwill be ignored.


globmapper点击打开事物

Both to and from are required and define patterns that may contain at most one *. For each source file that matches the frompattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.


identitymapper点击打开事物

The target file name is identical to the source file name. Both to and from will be ignored.


mergemapper点击打开事物

The target file name will always be the same, as defined by to - from will be ignored.


packagemapper点击打开事物

Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder. This mapper is particularly useful in combination with <uptodate> and <junit> output.

The to and from attributes are both required.


regexpmapper点击打开事物

Both to and from are required and define regular expressions. If the source file name (as a whole or in part) matches the frompattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. The to pattern determines the whole file name, so if you wanted to replace the extension of a file you should not use from="\.old$" to=".new" but rather from="(.*)\.old$" to="\1.new" (or rather use a glob mapper in this case).

Source files not matching the from pattern will be ignored.

Note that you need to escape a dollar-sign ($) with another dollar-sign in Ant.

The regexp mapper needs a supporting library and an implementation of org.apache.tools.ant.util.regexp.RegexpMatcher that hides the specifics of the library. Since Ant 1.8.0 Ant requires Java 1.4 to run, so the implementation based on the java.util.regex package will always be available. You can still use the now retired Jakarta ORO or Jakarta Regex instead if your provide the corresponding jar in your CLASSPATH.

For information about using gnu.regexp or gnu.rex with Ant, see this article.

If you want to use one of the regular expression libraries other than java.util.regex you need to also use the corresponding ant-[apache-oro, apache-regexp].jar from the Ant release you are using. Make sure, both will be loaded from the same classpath, that is either put them into your CLASSPATH, ANT_HOME/lib directory or a nested <classpath> element of the mapper - you cannot have ant-[apache-oro, apache-regexp].jar in ANT_HOME/lib and the library in a nested <classpath>.

Ant will choose the regular-expression library based on the following algorithm:


scriptmapper点击打开事物

This mapper executes a script written in Apache BSF or JSR 223 supported language, once per file to map.

The script can be declared inline or in a specified file.

 

See the Script task for an explanation of scripts and dependencies.


unpackagemapper点击打开事物

This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.

The to and from attributes are both required.