- Apache IVY 教程
- Apache IVY - 主頁
- Apache IVY - 概述
- Apache IVY - 環境設定
- Apache IVY - 術語
- Apache IVY - 設定檔案
- Apache IVY - Eclipse Ivy 外掛
- ANT Ivy 任務
- Apache IVY - resolve
- Apache IVY - install
- Apache IVY - retrieve
- Apache IVY - cachepath
- Apache IVY - publish
- Apache IVY - info
- 儲存庫
- Apache IVY - 解析器
- Apache IVY - 本地倉庫
- Apache IVY - 共享倉庫
- Apache IVY - 公共倉庫
- Apache IVY 實用的資源
- Apache IVY - 快速指南
- Apache IVY - 實用的資源
- Apache IVY - 討論
Apache IVY - 共享倉庫
共享倉庫是一個團隊層面團隊共享的倉庫。在組織中被覆蓋是很常見的。
預設位置
預設情況下,共享倉庫位於 ${ivy.default.ivy.user.dir}/shared 資料夾。如果您想更改它,請在 ant 檔案中使用 ivy.shared.default.root 變數。
build.xml
<target name="resolve"> <property name="ivy.shared.default.root" value="/opt/ivy/repository/shared"/> <ivy:resolve /> </target>
還可以以下列方式自定義其他屬性,如 ivy 模式和製品模式 −
build.xml
<target name="resolve"> <property name="ivy.shared.default.root" value="/opt/ivy/repository/shared"/> <property name="ivy.shared.default.ivy.pattern" value="[organisation]/[module]/[revision]/ivy.xml"/> <property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[artifact].[ext]"/> <ivy:resolve /> </target>
覆蓋 ivysettings 預設值
預設情況下,ivy 在 ivy.jar 中存在的 ivysettings.xml 中具有配置。
ivysettings.xml
<ivysettings>
<settings defaultResolver="default"/>
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
</ivysettings>
要覆蓋共享倉庫設定,請更新 ivysettings-shared.xml 的內容。
ivysettings-shared.xml
<ivysettings>
<property name="ivy.shared.default.root" value="${ivy.default.ivy.user.dir}/shared" override="false"/>
<property name="ivy.shared.default.ivy.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
<property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/>
<resolvers>
<filesystem name="shared">
<ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" />
<artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" />
</filesystem>
</resolvers>
</ivysettings>
廣告