Note Install ant before installing Ivy, because Ivy is Ant-based.
Installation and configuration of ANT
First, check if the system has been installed ant
Shortcut key Win+r Call up the Run dialog box, enter cmd Click OK to open the DOS window.
(1) Directly enter the command ant , If the display indicates that the environment variable has been installed and configured.
Or: (2) in the Command window input ant-version The ant version number indicates that the environment variable has been installed and configured.
if: ' ant ' is not an internal or external command, it is not a running program or a batch file.
Description ant has not been installed or the environment variable is not configured.
Second, the official website download the latest version of Ant
: http://ant.apache.org/bindownload.cgi
If the address is invalid, download it to Apache official website. Use Apache-ant-1.9.4-bin.zip here
Iii. decompression and configuration of environment variables
Unzip to D:\ant\, generate directory such as D:\ant\apache-ant-1.9.4
New variable name ant_home value D:\ant\apache-ant-1.9.4 (do not add a semicolon)
Add variable name PATH value.; %ant_home%\bin;
Iv. Verifying ant Installation
Repeat the first step " one, check if the system has been installed with Ant " (1) (2). where (1) appears
Buildfile:build.xml does not exist!
Build failed indicates that the ant installation was successful, and build.xml This file is the ant default file, this file needs to be established.
V. Build.xml Document Establishment Example
1. Create a new file in the D:\ant\apache-ant-1.9.4\ Bin directory named Bulid.xml
Edit the Bulid.xml file, such as (Copy from Network)
<?XML version= "1.0" encoding= "GBK"?><Projectname= "Test Script"default= "CopyFile"Basedir="." > <Targetname= "CopyFile"> <Copyfile= "D:/b.txt"Todir= "E:/copytemp"Overwrite= "true" /> </Target></Project>
2, in the D packing directory under the new B.txt write a line "Hello world!" "
3, open the DOS window, (1) Enter D: into the D-Disk directory, (2) Enter the directory where build.xml, enter the command cd ant\apache-ant-1.9.4\bin ;
(3) Enter command ant , perform the copyfile operation
In this case, you can find the file B.txt in the E:/copytemp directory, the same content as D:\b.txt, copy successfully
Ivy the installation and configuration
First, download
Download the latest version of Ivy from Apache official website. Here's what I'm downloading.
Official website: http://archive.apache.org/dist/ant/ivy/
Second, the configuration
Method One: (I chose the first method)
1, extract to any directory, such as D:\ant\, generate such as D:\ant\apache-ivy-2.4.0-rc1 directory.
2, configure the system environment variable name ivy_home value IVY's installation directory, such as D:\ANT\APACHE-IVY-2.4.0-RC1 (usually do not add semicolons here)
Then copy the Ivy***.jar file under the D:\ant\apache-ivy-2.4.0-rc1 directory to the Lib folder in the Ant installation directory.
Method Two: Execute ant in the Src/example/hello-ivy directory of ivy and download ivy and install it from the Internet. (Seen on the internet, not tested)
Method Three: In the DOS window directly with ant ivy-bootstrap to download (not pro-test).
Ant and Ivy Installation and configuration (Windows)