ANT configuration

xiaoxiao2021-04-02  206

1. First, download an Ant installation in a directory, such as: D: /Apache-ant-1.6.2. In fact, go to Apache's website Down an ant-current-bin.zip, then decompress a certain directory.

2. Add an ant_home in the environment variable, point to your installation directory D: /Apache-ant-1.6.2.

3, add% Ant_HOME% / BIN to the environment variable Path.

This way Ant is installed, you can run your Ant.

In general, use "ant -help" to query all commands of Ant, and call relative commands according to your needs.

Such as:

In the CMD window, enter the statement of build:

Ant build -buildfile d: /eclipse-sdk-3.1m2-win32/eclipse/Workspace/SpringApp/Build.xml

4. For each build.xml, there must be a build.properties to set the appropriate server directory address, and create a corresponding App folder in the server's directory. Corresponding to SpringApp requires establishing a D: /JAKARTA-TOMCAT-4.1.24/webapps/springapp directory. as follows:

# Ant Properties for building the SpringApp

Deploy.path = D: /jakarta-tomcat-4.1.24/webappstomcat.home=d: /jakarta-tomcat-4.1.24

Tomcat.Manager.url = http: // localhost: 8080 / manager

Tomcat.Manager.username = admin

Tomcat.manager.password = Tomcat

5. If you go to the directory where the directory is located in the CMD window, you can run the ANT command without specifying -buildfile, and you can run the ANT command, if you d: /eclipse-sdk-3.1m2-win32/eclipse/workspace/ There is build.xml in the SpringApp directory, and you need to enter the command as follows:

D: /eclipse-sdk-3.1m2-win32/eclipse/workspace/springapp>

Ant build

6, the ANT command can perform multiple, such as:

D: /eclipse-sdk-3.1m2-win32/eclipse/workspace/springapp>

Ant Build Deploy

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

New Post(0)