Ant的另外一個用途: Util Tool

由於小弟我生性懶惰,做任何事情都希望能越簡單越好。為了增加效率,某一天想到可以透過ant把一些“瑣事”寫在裡面。而UtilTool提供哪些功能,可以透過help的task,下面是我一個help範例:

<target name="help">
	<echo>do checkout: chekout testcases and installer.</echo>
	<echo>update installer: update ssmagent and ssmserver installer.</echo>
	<echo>test-chrome: execute testing with chrome</echo>
	<echo>test-ff: execute testing with chrome</echo>
	<echo>del nitc: delete non-installer testcases</echo>
</target>
help task的目的只是為了讓你知道script提供的command有哪些。像我就把更新installer、testing、checkout testcases等寫到裡面。喜歡的話還可以把一些functional script寫到裡面,做成攜帶版的debug工具。 執行結果:

剛Swind問我為何用ant,我說: 因為簡單、跨平台。