---
title: "Ant任务"
author: "抛出异常的爱"
date: "2006-06-12T10:14:00Z"
tags: []
slug: "ant"
draft: false
lastmod: "2006-06-12T10:14:00Z"
id: 29362
url: "https://loveexception.iteye.com/blog/29362"
---

**AppFuse的Ant任务**

This page contains a listing of the most common Ant targets in [**AppFuse**]() that I use in my daily development. For a complete list of tasks, type "ant -projecthelp" at the command line.

###### 任务

###### 描述

**setup**

建立database, 配置tomcat和deploys expanded war

**clean**

Removes build artifacts

**compile**

编译所有的文件

**deploy**

编译、然后部署到Tomcat

**deploy-web**

部署JSP和静态Web内容到Tomcat

**install**

使用Tomcat的Manager程序安装Web程序.  
对于向远程服务器上部署程序很适合

**list**

列出Tomcat已经安装、部署好的应用

**refresh**

Undeploys, cleans, 然后重新部署.

**reload**

使Tomcat重新装载所有程序

**remove**

删除Tomcat部署好的程序

**setup-db**

创建数据库，并插入范例需要的数据

**setup-tomcat**

复制JDBC驱动和context.xml到Tomcat相应目录下

**test-all**

运行所有用于测试dao, service和web的测试用例

**test-dao**

测试dao模块

**test-service**

测试service模块

**test-web**

使用Mocks测试Action/Controller (不需要容器)

**test-jsp**

在Tomcat中运行Canoo WebTest (启动/停止Tomcat, 执行前Tomcat应该被停止)

**test-canoo**

当Tomcat已经运行时，执行Canoo WebTest

**test-reports**

产生测试报告

**undeploy**

从 $CATALINA\_HOME/webapps中删除war文件和相应的目录