Sky's blog

          我和我追逐的夢

          常用鏈接

          統計

          其他鏈接

          友情鏈接

          最新評論

          ivy中文參考文檔(18)-ant任務(6)-deliver

          1) deliver

              交付當前模塊的解析好的描述符,而且可能執行依賴的遞歸交付。
             
              這個任務主要做兩個事情:

              1. 生成一個解析好的ivy 文件

              這個任務生成一個當前模塊的解析好的描述符,基于最后一次解析。解析好的ivy文件包含交付的模塊的已更新信息,例如修訂版本和狀態。

              此外,所有被包含的配置的文件將包含在ivy文件中,而且變量被他們的值替代。

              最終,在解析好的ivy文件中,動態修訂版本被在解析過程中找到的靜態的修訂版本替換,因此這些ivy文件后面可以安全的使用來獲得相同的依賴(前提條件是修訂版本唯一的標識一個模塊,這是ivy正常使用的基礎)。

              從1.3起 動態修訂版本被靜態修訂版本的替換可以被關閉,因此動態修訂版本被保留在ivy文件中。這對于發行的模塊描述符是完全解析好的推薦標準是一個例外,所以請小心使用。

              2. 執行遞歸交付

              僅在delever target被設置給delever任務時才這樣做。

              如果delever target被設置,則為每個和這個任務設置的delever狀態對比沒有suffisant狀態的依賴,它會被調用(通過antcall)。這意味著如果你交付一個集成修訂版本,遞歸交付不會進行。

              如果你交付一個里程碑或者發行修訂版本,delever target將和每個集成依賴一起被調用。

              delever target被調用時有下面的屬性可用:
          • dependency.name
          • 遞歸交付的依賴的名稱
          • dependency.published.status
          • 將交付的依賴的狀態
          • dependency.published.version
          • 將交付的依賴的修訂版本
          • dependency.version
          • 將交付的依賴的修訂版本
              dependency.published.status和dependency.published.version 要求用戶通過ant輸入任務給出(默認行為),或者對于整個遞歸交付過程總是相同,如果下列屬性被設置:

          • recursive.delivery.status
          • 設置被要求交付的所有依賴的狀態
          • recursive.delivery.version
          • 設置被要求交付的所有依賴的版本
              通常交付任務自身引發另外一個ant build(使用ant 任務),雖然這取決于你。
              交付的ivy文件將使用那些在這里給出的更新它的依賴的修訂版本。

          2) deliver和publish

              交付任務大多數情況下并不顯式調用,而且通過publish任務自動調用。因此,什么時候應該顯示的調用deliver任務呢?當你真正需要區分什么是deliver任務產生的,什么是publish任務產生的時候。或者說,上傳一個模塊到倉庫。

              如果你想在上傳之前處理產生的ivy文件(如果你想自動添加更多信息如使用SCM 標簽,執行release的用戶,...),這將非常有用。

              如果你想觸發一個遞歸交付并保證你如依賴一樣得到遞歸交付的模塊,它也將有用。在這種情況下你的構建的順序可能像這樣:

          - ivy:configure
          - ivy:resolve
          - ivy:deliver with recursive delivery
          - ivy:resolve again with the ivy file generated by the recursive delivery
          - do your build stuff (compile, jar, whatever)
          - ivy:publish

          3) 屬性

          屬性描述必要
          deliverpattern ivy文件交付時使用的正則表達式
          不,默認為${ivy.deliver.ivy.pattern}
          pubrevision 發布時使用的修訂版本
          不,默認為${ivy.deliver.revision}如果設置了,或者解析好的修訂版本如果設置了,或者時間戳
          pubbranch the branch to use for the publication
          發布時使用的分支
          不,默認為${ivy.deliver.branch}如果設置了,或者解析好的分支如果設置了,或者沒有(分支信息將不被更新)
          pubdate the publication date to use for the publication. This date should be either 'now', or a date given with the following pattern: yyyyMMddHHmmss
          No. Defaults to 'now'
          status the status to use for the publication No. Defaults to ${ivy.status}
          delivertarget the target to call for recursive delivery No. No recursive delivery is done by default
          validate true to force ivy files validation against ivy.xsd, false to force no validation No. Defaults to default ivy value (as configured in configuration file)
          replacedynamicrev true to replace dynmic revisions by static ones in the delivered file, false to avoid this replacement (since 1.3) No. Defaults to true
          settingsRef A reference to the ivy settings that must be used by this task (since 2.0) No, 'ivy.instance' is taken by default.
          conf comma-separated list of configurations to include in the delivered file. Accepts wildcards. (since 2.0) No. Defaults to all configurations
          generateRevConstraint true to automatically generate a 'revConstraint' attribute in the deliverd file (see the dependency page for more info about this attribute), false to never generate this attribute (since 2.1.0) No. Defaults to true


          4) 例子

              交付一個ivy文件,不使用private設置:
              <deliver conf="*(public)" />

          posted on 2009-08-31 22:22 sky ao 閱讀(1315) 評論(0)  編輯  收藏 所屬分類: project building

          主站蜘蛛池模板: 玛曲县| 天柱县| 来宾市| 新泰市| 广平县| 岫岩| 保山市| 威海市| 北海市| 九龙城区| 福安市| 贞丰县| 南涧| 宝坻区| 永修县| 常州市| 晋江市| 佳木斯市| 牡丹江市| 慈溪市| 格尔木市| 陈巴尔虎旗| 星子县| 宣武区| 蓝田县| 泸水县| 广饶县| 承德市| 云安县| 闸北区| 綦江县| 盘山县| 武鸣县| 北辰区| 沁阳市| 资阳市| 平安县| 巴林左旗| 清远市| 商南县| 黄龙县|