ref:http://ant.apache.org/manual/
book: Ant: The Definitive Guide, Second Edition
following is an easy demo:
run.bat
@echo off
rem=====Java Environment=====
set JAVA_HOME=D:/install/develop_tool/java/jdk1.6.0_11
set path=%JAVA_HOME%/bin
set CLASSPATH=.;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar
rem=====Ant Environment=====
set ANT_HOME=D:\install\develop_tool\apache-ant-1.8.2
set path=%ANT_HOME%\bin;%path%
build.xml
<?xml version="1.0"?>
<project default="dist" name="Project for Fun">
<description>A simple Java Project</description>
<property name="demo1.srcDir" location="src"/>
<property name="demo1.buildDir" location="build"/>
<property name="demo1.distDir" location="dist"/>
<target name="init" description="==> begin to init.">
<tstamp/>
<mkdir dir="${demo1.buildDir}"/>
<mkdir dir="${demo1.distDir}"/>
</target>
<target name="compile" description="==> begin to compile" depends="init">
<tstamp/>
<javac srcdir="${demo1.srcDir}" destdir="${demo1.buildDir}"/>
</target>
<target name="dist" description="==> begin to dist" depends="compile">
<tstamp/>
<jar destfile="${demo1.distDir}/package-${DSTAMP}.jar" baseDir="${demo1.buildDir}">
<manifest>
<attribute name="Built-By" value="${user.home}"/>
<attribute name="Main-Class" value="HelloWorld"/>
</manifest>
</jar>
</target>
<target name="clean" description="==> begin to clean" >
<tstamp/>
<delete dir="${demo1.buildDir}"/>
<delete dir="${demo1.distDir}"/>
</target>
</project>
分享到:
相关推荐
ant_1.2.6 ant_1.2.6 zip
最小主瓣的Beamforming 利用的cvx优化
13_ant_发布web项目和操作数据库13_ant_发布web项目和操作数据库
org.apache.ant_1.7.1.v20100518-1145.zip an 1.7版本所有包
ant_basic_test_ANT_JAVA_ACO_in1rr_源码.zip
Apache_Ant_中文手册.doc apache ant 讲解。。。
Ant_的最完整build.xml解释,Ant入门与进阶,ant学习工具书
org.apache.ivy.eclipse.ant_2.4.0.final_20141213170938.jar
ant colony optimization
Apache_Ant_中文手册Apache_Ant_中文手册Apache_Ant_中文手册Apache_Ant_中文手册
自己找了好久都没找到1.7版本的chm帮助手册,1.7完整手册在官网是在线浏览,感觉不方便,就从ANT官网下载,自己打包生成chm格式文件。包含doc文档完整内容。
org.eclipse.emf.ant_2.1.0.jarorg.eclipse.emf.ant_2.1.0.jarorg.eclipse.emf.ant_2.1.0.jarorg.eclipse.emf.ant_2.1.0.jar
9_ant_通过ftp发布文件9_ant_通过ftp发布文件
ant_最新適合新手操作3ant_最新適合新手操作3ant_最新適合新手操作3ant_最新適合新手操作3
ant_最新適合新手操作2ant_最新適合新手操作2ant_最新適合新手操作2ant_最新適合新手操作2
7_ant_junit和ant的整合(非常重要)7_ant_junit和ant的整合(非常重要)
antenna selection algorithmn over MIMO fading channel
8_ant_通过ant生成doc和zip(基于实战的)8_ant_通过ant生成doc和zip(基于实战的)
10_ant_基于j2se的综合实战项目_0110_ant_基于j2se的综合实战项目_01
标签:ant_optional_1_4_1.jar.zip,ant_optional_1_4_1,jar.zip包下载,依赖包