- 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 - 環境設定
Apache Ivy 唯一的要求是您的計算機上需要安裝 Java 和 ANT。
Apache Ant 在 Apache 軟體許可證下發行,這是一個獲得開源倡議認證的成熟開源許可證。
最新的 Apache Ant 版本,包括其完整的原始碼、類檔案和文件,可以在 http://ant.apache.org 找到
安裝 Apache Ant
假設您已在計算機上下載並安裝了 Java 開發工具包 (JDK)。如果沒有,請按照 這裡的說明進行操作。
確保 JAVA_HOME 環境變數設定為 JDK 安裝的資料夾。
從 https://ant.apache.org 下載二進位制檔案
使用 Winzip、winRAR、7-zip 或類似工具將 zip 檔案解壓縮到方便的位置 c:\folder。
建立一個名為 ANT_HOME 的新環境變數,指向 Ant 安裝資料夾,在本例中為 c:\apache-ant-1.10.12-bin 資料夾。
將 Apache Ant 批處理檔案的路徑新增到 PATH 環境變數。在本例中,這是 c:\apache-ant-1.10.12-bin\bin 資料夾。
驗證 Apache Ant 安裝
要在您的計算機上驗證 Apache Ant 是否成功安裝,請在命令提示符下鍵入 ant。
您應該看到類似於以下的輸出:
C:\>ant -version Apache Ant(TM) version 1.10.12 compiled on October 13 2021
如果您沒有看到上述輸出,請驗證您是否已正確執行安裝步驟。
安裝 Apache Ivy
從 https://ant.apache.org/ivy 下載二進位制檔案
使用 Winzip、winRAR、7-zip 或類似工具將 zip 檔案解壓縮到方便的位置 c:\folder。
將 ivy-2.5.0.jar 複製到 c:\apache-ant-1.10.12-bin/lib 資料夾。
驗證 Apache Ivy 安裝
要在您的計算機上驗證 Apache Ivy 是否成功安裝,請在 E: > ivy 資料夾中建立以下構建檔案。
<project name="test ivy installation"
default="test" xmlns:ivy="antlib:org.apache.ivy.ant">
<target name="test" description="Test ivy installation">
<ivy:settings />
</target>
</project>
您應該看到類似於以下的輸出:
C:\>ant Buildfile: E:\ivy\build.xml test: BUILD SUCCESSFUL Total time: 2 seconds
安裝 Eclipse
本教程還介紹了 Ant 與 Eclipse IDE 整合的相關內容。因此,如果您尚未安裝 Eclipse,請下載並安裝 Eclipse。
要安裝 Eclipse:
從 www.eclipse.org 下載最新的 Eclipse 二進位制檔案
將 Eclipse 二進位制檔案解壓縮到方便的位置,例如 c:\folder
從 c:\eclipse\eclipse.exe 執行 Eclipse