anthtml
1. ant手冊翻譯android
ant手冊翻譯是一項大工程!!!!!!apache
ant在線手冊的連接好不明確。app
2. ant 支持for循環less
安裝ant-contrib Ref[1.1]. 要在ant的build.xml腳本中支持,參考連接Ref[1.2]。ide
下面的build.xml是遍歷txt文件,將每一行進行輸出的ant腳本。Ref[1.3]ui
1 <?xml version="1.0" encoding="UTF-8"?> 2 <project name="android_rules" default="iterate"> 3 4 <taskdef resource="net/sf/antcontrib/antlib.xml"/> 5 6 <target name="iterate"> 7 <loadfile property="lines" srcFile="CopyRes.txt"> 8 <filterchain> 9 <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks"> 10 <param name="linebreaks" value="\n"/> 11 </filterreader> 12 </filterchain> 13 </loadfile> 14 15 <for list="${lines}" param="line"> 16 <sequential> 17 <echo>@{line}</echo> 18 </sequential> 19 </for> 20 21 </target> 22 23 </project>
Referencethis
1. ant-contribspa
1.1 http://ant-contrib.sourceforge.net.net
1.2 http://ant-contrib.sourceforge.net/tasks/index.html
1.3 http://stackoverflow.com/questions/5087929/how-to-iterate-over-the-file-content-using-ant-script
2. ant 工程主頁
http://ant.apache.org/
Running Apache Ant | Command Line Running Ant as a background process on Unix(-like) systems Running Ant via Java |
Properties |
Built-in Properties PropertyHelpers Property Expansion
Nesting of Braces Expanding a "Property Name" If/Unless Attributes
|
Filter |
|
Typedef |
Adds a task or a data type definition to the current project such that this new type or task can be used in the current project. |
FileSet |
A FileSet is a group of files. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets and Selectors. |
Task |
http://ant.apache.org/manual/Tasks/ http://ant.apache.org/manual/Tasks/conditions.html http://ant-contrib.sourceforge.net/tasks/tasks/index.html |
FilterSet |
http://ant.apache.org/manual/Types/filterset.html FilterSets are groups of filters. Filters can be defined as token-value pairs or be read in from a file. FilterSets can appear inside tasks that support this feature or at the same level as |
FilterChains and FilterReaders |
http://ant.apache.org/manual/Types/filterchain.html |