Getting start - configuration and use

xiaoxiao2021-03-05  19

This article of this article blog:

http://blog.9cbs.net/gotoidea/

Getting start - configuration and use

First download Ant at http://jakarta.apache.org/builds, then decompress to the local, I compressed it into the C: / Ant directory

Modify attributes in environment variables

Increase before the Path property ---- C: / Ant / bin; then use Ant

BUILD.XML files contain a Project and at least one Target element, and the target element contains one or more task elements, and the task is an executable code.

The root element is Project, three attributes name, default, basedir

Name designated project name

Default specifies the engineering default target element

Basedir specifies the base path of the project, if yes ".", is represented as build.xml.

< ! - Do not copy this file ->

< Classes dir = "$ {build} / web-inf / class" />

this build.xml file contacts targets for building bookstore Web Application

Our build.xml under the root of our app

So the way to run the ANT is: under DOS

1. Enter C: / MyApp, enter: Ant in our application directory: Ant (will search the build.xml file under the current path)

2. Enter Ant -BuildFile C: /myApp/Build.xml directly

3. Enter directly -buildfile c: /myapp/build.xml about

All three ways are implemented in Target, if we want to compile Java files, we only need

ANT -BUILDFILE C: /MYAPP/BUILD.XML Compile

转载请注明原文地址:https://www.9cbs.com/read-39029.html

New Post(0)