Common Tool —— ant
来源:互联网 发布:墨鲤抄 淘宝 编辑:程序博客网 时间:2024/05/16 11:21
Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other.
Ant是一个将软件编译、测试、部署等步骤联系在一起加以自动化的工具
build.xml语法
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- <project>是根元素 name: 项目名 basedir: 项目根目录 default: 默认运行的<target>单元--><project name="pro" basedir="." default="clean" ><!-- <property>属性定义--><property enviroment="env" /> <!-- 必须放在最前,确保可以使用编译平台的环境变量 --><property name="source" value="src" /><property name="library" value="lib" /><property name="target" value="target" /><!-- <path>路径定义 id: 路径名 fileset: 目标文件--><path id="pathId"> <fileset dir="${librarg}" include="*.jar" /></path><!-- <target>是处理单元 name: 单元名 depends: 标记执行顺序--><!-- ## 处理流程示例: init -> compile -> build -> clean ## --><!-- ## init ## --><target name="init"> <!-- <mkdir>创建目录 dir: 目录 --> <mkdir dir="${target}" /> <mkdir dir="${target}/classes" /> <mkdir dir="${target}/tmp" /></target><!-- ## compile ##--><target name="compile" depends="init"> <!-- <javac>编译 srcdir:源目录 destdir: 目标目录 include: 匹配模式 exclude: 排除模式 classpath: 类路径--> <javac srcdir="${source}" destdir="${target}/classes" encoding="UTF-8" includeantruntime="false"> <include name="*.java" /> <classpath refid="pathId" /> </javac></target><!-- ## build ## --><target name="jar" depends="compile"> <jar destfile="${target}/project.jar" /></target><!-- ## clean ##--><target name="clean" depends="jar"> <!-- <copy>拷贝 file:源文件 tofile: 目标文件 dir: 源目录 todir: 目标目录 overwrite: 覆盖 --> <copy todir="${target}/tmp"> <fileset dir="${target}/classes"> <include name="*.class" /> </fileset> </copy> <!-- <delete>删除文件或目录 file:文件名 dir: 目录名 --> <delete dir="${target}/classes" /></target></project>
0 0
- Common Tool —— ant
- Ant(Another Neat Tool)
- about the Ant tool
- Ant tool in Eclipse
- Ant(another net tool)--1
- Ant(another net tool)--2
- tool——toolofna
- Ant—Ant标签解释
- ant-another neat tool-应用指南
- backup blog tool—HTTrack
- Ant——ant的使用
- ant——condition
- ant——学习
- Ant——classpath
- J2EE——Ant
- Android打包—Ant
- Android Tool——Monkey自动化测试
- HDU1159——Common Subsequence
- 配置文件越来越大原来是自动转移惹的祸~
- 5.10.1 视口转换
- 0001.安装mysql
- 0002.hive安装
- 0003.hive启动错误
- Common Tool —— ant
- 207 Course Schedule
- 设置系统环境变量
- ajax所有笔记
- 课件_46.第九章:Ajax技术[1]-初探浏览器原生Ajax接口(1)
- linux下面误删root里面的文件夹 恢复方法~~
- 课件_47.第九章:Ajax技术[2]-初探浏览器原生Ajax接口(2)_1
- En(2015-11)把你唱给世界听
- 课件_47.第九章:Ajax技术[2]-初探浏览器原生Ajax接口(2)_2