Ant Getting Started

Source: Internet
Author: User
Tags manual documentation java open source projects

Ant (Another Neat Tool) is a mainstream build tool that is now used by almost all Java open source projects to build its own projects, and the mainstream IDE provides good support for Ant.

Ant is fully developed using the Java language, and open source, easy to use extensible, ant the most important task is to build the project according to the need to write the corresponding build.xml file, use the file control program compiling, running, packaging and other operations.

u ant Download

Ant is an open source, free software that can download the latest version from the following addresses:

http://ant.apache.org/

U ant installation and configuration

The ant installer is a compressed file, for example, the latest version of the ant 1.6.5 Installer file name is--apache-ant-1.6.5-bin.zip.

Installation of 1.Ant

The ant installation is simple and can be uncompressed. You can extract to any directory as needed.

2.Ant of configuration

After installing ant, you need to configure two environment variables for easier use:

A) path--adds the bin under the Ant installation directory to path.

b) Ant_home--ant installation directory, such as C:\ant\apache-ant-1.6.5.

This allows you to build it using ant below the command line.

u Ant's Documentation

Learning Ant's use, you can read Ant's documentation carefully, and that's what I'm learning. Ant's Manual can be read from the docs\manual\index.html in the Ant installation directory, which is the best documentation for learning ant usage and finding ant tags.

U build.xml file Basic format

The core content of Ant is to write the Build.xml file, which is a standard XML file whose infrastructure is:

<?xml version="1.0"?>
       <project>
           <target>
              ……
           </target>
       </project>

The function of each label and its properties refer to the Ant document.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.