一为减小buildxml 文件的大小使用XML实体
把属性的设置都放一个XML文件中
propsxml 文件
<property name=builddir value=build />
然后在 buildxml 文件中加入如下
<!DOCTYPE project [<!ENTITY properties SYSTEM file:propsxml>]>
二将多个目录的源文件编译到一个地方
<javac destdir=build/classes>
<src path=src/>
<src path=src/>
</javac>
三保存构建时的信息
<project default=init>
<target name=init></target>
<property environment=env />
<property name=envCOMPUTERNAME value=${envHOSTNAME} />
<propertyfile comment=Build Information file=/buildinfoproperties>
<entry key=buildhost value=${envCOMPUTERNAME} />
<entry key=buildusername value=${username} />
<entry key=buildosname value=${osname} />
</propertyfile>
</project>
[] [] []