ant初识(一)
来源:互联网 发布:app软件著作权说明书 编辑:程序博客网 时间:2024/06/04 20:00
初步学习ant,因难度较低,资料较多,初级学习较容易,直接贴代码
<?xml version="1.0"?><project name="AntTEST" default="testwar"><property name="antname">antname's name</property><property name=""></property><target name="sayHelloWorld" depends="testcopy"><echo message="Hello,Amigo" /><echo>${basedir}</echo><echo>${ant.java.version}</echo><echo>${antname}</echo><echo>${ant.file}</echo></target><target name="testif" unless="name"><echo>this is testif </echo></target><target name="testcopy"><!--<copy file="test.txt" tofile="test2.txt"></copy><copy file="test.txt" todir="testidir"></copy>--><copy todir="tttt" overwrite="true"><fileset dir="testccc"></fileset></copy></target><target name="testdel"><!--<delete file="test.txt"></delete><delete dir="testidir"></delete>--></target><target name="clean"><delete dir="build"/></target><target name="compile" depends="clean"><mkdir dir="build/classes"/><javac srcdir="src" destdir="build/classes"/></target><target name="testjava" depends="compile"><java classname="test.HelloWorld"><classpath><pathelement path="build/classes"/></classpath></java></target><target name="testjar"><jar destfile="helloworld.jar" basedir="build/classes"></jar></target><target name="testwar" depends="compile"><war destfile="${build}/antwebproject.war" webxml="WebContent/WEB-INF/web.xml"><!-- 拷贝WebRoot下除了WEB-INF和META-INF的两个文件夹--><fileset dir="WebContent" includes="**/*.jsp" /><!-- 拷贝lib目录下的jar包--><lib dir="WebContent/WEB-INF/lib/" /><!-- 拷贝build/classes下的class文件--><classes dir="build/classes"/></war></target></project>
学习参考自:http://www.blogjava.net/amigoxie/archive/2007/11/09/159413.html
遗留问题:
拷贝功能,将一个文件夹拷贝到另外一个文件夹下,而不是拷贝文件夹下的内容。
0 0
- ant初识(一)
- Ant构建项目(一)初识
- ant初识(二)
- ant 初识
- 初识ant
- 初识ant
- Ant初识
- ANT涉猎(一)
- Ant学后感(一)
- ANT教程(一)
- Ant笔记(一)
- Ant 基础教程(一)
- Ant学习笔记(一)-Ant入门
- 初识OLAP(一)
- 初识 Service(一)
- 初识jbpm(一)
- 初识XML(一)
- c#初识(一)
- 程序员无聊之时开发出来的一款产品
- HOG特征+SVM训练进行行人检测。
- 什么是回调函数
- Jquery发送ajax请求以及datatype参数为text/JSON方式
- hdoj_1010 Temper of The Bone
- ant初识(一)
- CPP3基础
- eclipse运行时出现 android library project cannot be launch
- PAT A1020 Tree Traversals 根据先序和中序求层序
- 错误:“The content of element type "package" must match "(result-types?,interceptors?,default-intercept
- PADS:怎样全局替换元件封装
- 每日一题9:字典树(一)
- Sundy视频学习------TCPIP编程基础
- [Python]网络爬虫(八):糗事百科的网络爬虫(v0.3)源码及解析(简化更新)