java

位置:IT落伍者 >> java >> 浏览文章

Ant的一些偏门技巧[2]


发布日期:2020年08月11日
 
Ant的一些偏门技巧[2]

去除属性文件的注释

属性文件

# 这里是注释会给过滤掉

builddir = build

build文件

<copy file=propsproperties todir=sample>

<filterchain>

<striplinecomments>

<comment value=# />

</striplinecomments>

</filterchain>

</copy>

两个花俏的功能

声音提示

<project name=Sound default=all>

<property file=buildproperties />

<target name=init>

<sound>

<success source=${sounddir}/successwav duration= />

<fail source=${sounddir}/failwav loops= />

</sound>

</target>

<target name=fail depends=init>

<fail />

</target>

<target name=success depends=init />

<target name=all depends=success />

</project>

[] [] []

               

上一篇:Ant的一些偏门技巧[3]

下一篇:Java常用的ant的操作方法[3]