Apache Ivy 简明教程
Apache IVY - Environment Setup
Apache Ivy 对你的电脑只要求安装了 Java 和 ANT。
Apache Ivy needs Java and ANT installed on your machine as the only requirement.
Apache Ant 是在已通过开放源代码计划认证的全面开源许可证“Apache 软件许可证”之下分发的。
Apache Ant is distributed under the Apache Software License, a fully-fledged open source license certified by the open source initiative.
可以 http://ant.apache.org 上找到最新的 Apache Ant 版本,其中包括其全部源代码、类文件和文档。
The latest Apache Ant version, including its full-source code, class files, and documentation can be found at http://ant.apache.org
Installing Apache Ant
假设您已在计算机上下载并安装了 Java 开发工具包 (JDK)。如果没有,请按照说明操作 here 。
It is assumed that you have already downloaded and installed Java Development Kit (JDK) on your computer. If not, please follow the instructions here.
-
Ensure that the JAVA_HOME environment variable is set to the folder where your JDK is installed.
-
Download the binaries from https://ant.apache.org
-
Unzip the zip file to a convenient location c:\folder. using Winzip, winRAR, 7-zip or similar tools.
-
Create a new environment variable called ANT_HOME that points to the Ant installation folder, in this case c:\apache-ant-1.10.12-bin folder.
-
Append the path to the Apache Ant batch file to the PATH environment variable. In our case this would be the c:\apache-ant-1.10.12-bin\bin folder.
Verifying Apache Ant Installation
在计算机中验证 Apache Ant 的安装是否成功,请在命令提示符中键入 ant。
To verify the successful installation of Apache Ant on your computer, type ant on your command prompt.
您应该看到类似于 − 的输出
You should see an output similar to −
C:\>ant -version
Apache Ant(TM) version 1.10.12 compiled on October 13 2021
如果您没有看到以上输出结果,请验证您是否已经正确地按照安装步骤操作。
If you do not see the above output, then please verify that you have followed the installation steps properly.
Installing Apache Ivy
-
Download the binaries from https://ant.apache.org/ivy
-
Unzip the zip file to a convenient location c:\folder. using Winzip, winRAR, 7-zip or similar tools.
-
Copy the ivy-2.5.0.jar to c:\apache-ant-1.10.12-bin/lib folder.
Verifying Apache Ivy Installation
要在计算机上验证 Apache Ivy 是否成功安装,请在文件夹 E: > ivy 中创建以下构建文件。
To verify the successful installation of Apache Ivy on your computer, create following build file in a folder 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>
您应该看到类似于 − 的输出
You should see an output similar to −
C:\>ant
Buildfile: E:\ivy\build.xml
test:
BUILD SUCCESSFUL
Total time: 2 seconds
Installing Eclipse
本教程还介绍了如何将 Ant 与 Eclipse IDE 集成。因此,如果您尚未安装 Eclipse,请下载并安装 Eclipse。
This tutorial also covers integration of Ant with Eclipse IDE. Hence, if you have not installed Eclipse already, please download and install Eclipse.
要安装 Eclipse −
To install Eclipse −
-
Download the latest Eclipse binaries from www.eclipse.org
-
Unzip the Eclipse binaries to a convenient location, say c:\folder
-
Run Eclipse from c:\eclipse\eclipse.exe