Sky's blog

          我和我追逐的夢

          常用鏈接

          統計

          其他鏈接

          友情鏈接

          最新評論

          ivy中文參考文檔(13)-ant任務(1)-buildlist

              buildlist任務用于獲取按照ivy依賴信息從小到大排序的文件(通常是build.xml文件) 列表,或者相反(從1.2之后)

              這個任務在結合subant構建相關項目集合時特別有效, 可以確保依賴在其他依賴它的模塊之前被構建。

              當你要排序的模塊的ivy.xml不包含修訂版本號,在依賴上定義的rev屬性將不被使用。
              當你要排序的模塊的ivy.xml包含修訂版本號,修訂版本號將被使用。如果修訂版本號和依賴描述不匹配,將會記錄警告日志而模塊被認為是不同的模塊.

              從1.3版本起,root屬性也可以用來在找到的所有模塊之中只選擇依賴(不管式直接還是間接)root模塊的模塊。可以和excluderoot屬性同時使用,當設置為true時將從列表中排除root自己。

              從1.4版本起, leaf屬性也可以用來在找到的所有模塊之中只選擇依賴(不管式直接還是間接)leaf模塊的模塊。可以和excludeleaf屬性同時使用,當設置為true時將從列表中排除leaf自己。

              從1.4版本起, 在這個任務執行之后ivy.sorted.modules屬性將在ant中設置,值為逗號分隔的排序好的模塊列表。這可以用于調試或者報告。

              從2.0版本起,root和leaf屬性可以是用來作為root的模塊的分隔列表。這些模塊和他們所有的模塊將被包含在構建列表中。

              從2.0版本起,默認所有循環依賴的模塊將被組合,以便在這個循環中的任何模塊的任何依賴都在循環中的模塊前出現。如果有一個依賴路徑在模塊A和B之間(但是沒有從B到A的依賴路徑),B將在A之前出現,即使A被包含在一個用來排序的模塊集合的循環中。

              從2.0版本起,當你指定roo和leaf模塊你可以限制結果列表為只有root模塊的直接依賴或者leaf模塊的直接依賴。

              從2.0版本起,你可以指定一個restartFrom模塊。和root或者leaf不同的是,你可以得到一個從restartFrom模塊開始的,后面是如果這個參數沒有設置時應該在后面的所有模塊,的文件列表,(即使沒有依賴在restartFrom和后面的模塊之間)
           

          屬性
          描述
          要求
          reference the reference of the path to set
          要設置的路徑引用
          Yes
          ivyfilepath the relative path from files to order to corresponding ivy files
          從文件到對應的ivy文件的相對路徑
          No. 默認為 ${ivy.buildlist.ivyfilepath}
          root since 2.0 the names of the modules which should be considered as the root of the buildlist.
          從2.0起 模塊名(可以是多個)將被認為是構建列表的root
          since 1.3 Was limited to only one module name before 2.0.
          從1.3起在2.0前被限制為只能設置一個模塊名
          No. 默認沒有root (在構建列表中所有模塊都將被使用)
          excluderoot since 1.3 true if the root defined should be excluded from the list
          從1.3起 true如果需要將定義的root排除在列表之外
          No. 默認是false
          leaf since 2.0 the names of the modules which should be considered as the leaf of the buildlist.
          從2.0起 模塊名(可以是多個)將被認為是構建列表的leaf
          since 1.4.1 Was limited to only one module name before 2.0.
          從1.4.1起在2.0前被限制為只能設置一個模塊名
          No. 默認沒有leaf (在構建列表中所有模塊都將被使用)
          onlydirectdep since 2.0 true if the
          resulting list should be restricted to direct dependencies of root modules or modules that directly depends on the leaf modules.
          This field is ignored when neither root neither leaf is filled.
          從2.0起 true如果結果列表被限制為root模塊的直接依賴或者直接依賴leaf模塊。當root和leaf都沒有被設置時這個屬性將被忽略
          No. 默認是false
          delimiter since 2.0 delimiter to use when specifying multiple module names in the root and leaf properties.
          從2.0起 當指定多個模塊名時在root和leaf屬性中使用的分隔符
          No. 默認是逗號(,).
          excludeleaf since 1.4.1 true if the leaf defined should be excluded from the list
          從1.4.1起 true如果需要將定義的leaf排除在列表之外
          No. 默認是false
          haltonerror true to halt the build when an invalid ivy file is encountered, false to continue
          當遇到一個無效的ivy文件時,true終止構建,false繼續
          No. 默認是true
          skipbuildwithoutivy Deprecated, use onMissingDescriptor instead. true to skip files of the fileset with no corresponding ivy file, false otherwise. If false the file with no corresponding ivy file will be considered as independent of the other and put at the beginning of the built filelist.
          申明不贊成繼續使用,請使用onMissingDescripto。
          No. 默認是false
          onMissingDescriptor since 2.0 Specify the action to take when no module descriptor file is found for a file of the fileset. Possible values are:
          從2.0起 當文件集合中的一個文件找不到模塊描述文件時指定處理動作:
          • head
          • put at the head of the built filelist.
          • tail
          • put at the tail of the built filelist.
          • skip
          • skip the file, which won't be put in the build filelist at all.
          • warn
          • warn and put at the head of the build filelist.
          • fail
          • halt the build with a failure.
          No. Defaults to 'head'
          reverse true to obtain the list in the reverse order, i.e. from the most dependent to the least one
          true 用于獲取倒敘排列的列表。例如從最大依賴到最小
          No. 默認是 false
          restartFrom since 2.0 The name of the module which should be considered as the starting point in the buildlist. This allows for the build to be started at any point in the dependency chain.
          從2.0起 被認為是構建列表的起點的模塊的名字。這容許構建從依賴鏈的任意節點開始。
          No. 默認沒有restart point (在構建列表中所有模塊都將被使用).
          settingsRef since 2.0 A reference to the ivy settings that must be used by this task
          從2.0起 必須被這個任務使用的ivy設置的一個引用。
          No, 默認使用'ivy.instance'.



          內嵌元素參數說明
          fileset
          文件集合用于選擇文件集合來排序。


          范例:

              <ivy:buildlist reference="build-path">
                
          <fileset dir="projects" includes="**/build.xml"/>
              
          </ivy:buildlist>

              構建一個build.xml文件列表,根據在相同級別上找到的ivy.xml文件(ivyfilepath的默認值是ivy.xml)來排序。

              然后這個列表可以像這樣被使用:

              <subant target="build" buildpathref="build-path" />

              
          <ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" reverse="true">
                
          <fileset dir="projects" includes="**/build.xml"/>
              
          </ivy:buildlist>

              構建一個build.xml文件列表,根據在這些構建文件相對的ivy目錄下找到的ivy.xml文件(ivyfilepath的默認值是ivy.xml)來排序。列表被從最多依賴到最少排序。

              <ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" root="myapp">
                
          <fileset dir="projects" includes="**/build.xml"/>
              
          </ivy:buildlist>

              構建一個build.xml文件列表,根據在這些構建文件相對的ivy目錄下找到的ivy.xml文件(ivyfilepath的默認值是ivy.xml)來排序。僅有是myapp的依賴的模塊(不管是直接還是間接)的build.xml被放置在結果列表中。

              <ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" leaf="mymodule">
                
          <fileset dir="projects" includes="**/build.xml"/>
              
          </ivy:buildlist>

              構建一個build.xml文件列表,根據在這些構建文件相對的ivy目錄下找到的ivy.xml文件(ivyfilepath的默認值是ivy.xml)來排序。僅有是依賴mymodule的模塊(不管是直接還是間接)的build.xml被放置在結果列表中。

          posted on 2009-08-02 09:52 sky ao 閱讀(1452) 評論(0)  編輯  收藏 所屬分類: project building

          主站蜘蛛池模板: 翁源县| 曲松县| 咸丰县| 安溪县| 西青区| 自治县| 敦化市| 嘉黎县| 青海省| 徐水县| 临夏县| 科技| 运城市| 兴城市| 阿坝| 海兴县| 临桂县| 晋江市| 河津市| 重庆市| 诸城市| 津南区| 长沙县| 吴忠市| 池州市| 沿河| 浦江县| 陇川县| 辽阳市| 林周县| 房产| 望都县| 邵武市| 长乐市| 乾安县| 汝城县| 革吉县| 渭南市| 胶南市| 马尔康县| 平昌县|