28
The ANT api manual can be found
here and is a good place for reference.
Best way to appreciate the ANT is by an example.
To create an ANT file just create a build.xml file (any xml file will do) in Eclipse, load it into the editor then press Alt + SHIFT + X then press Q to run the currently loaded ANT script in eclipse.
Here is one I made earlier
le="color: #000000"><?php <?xml version="1.0" encoding="UTF-8"?> <project name="xasset Export" default="build" basedir=".."> <property name="exclude" value="**/.svn, docs/**, tests/**, build/**, vpproject/**, **/*.psd, .cdtproject, .project, **/*.bak, class/svn/cache/*, exports/**, help/**, **/*.zpj, class/gateways/*.txt, class/gateways/IPG.php"/> <property name="paypalPlugin" value="class/gateways/paypal.php"/> <target name="build"> <!-- build the standard package--> <zip destfile="exportsxasset.zip"> <zipfileset dir="." excludes= "${exclude},${paypalPlugin}" prefix="xasset"/> <zipfileset dir="docs" includes="README.txt" fullpath="xasset/docs/README"/> <zipfileset dir="help" includes="xasset.hlp" prefix="xasset/docs"/> <zipfileset dir="help" includes="xasset.cnt" prefix="xasset/docs"/> <zipfileset dir="class" includes="index.html" prefix="xasset/docs"/> </zip> <tar destfile="exportsxasset.tar"> <tarfileset dir="." excludes= "${exclude},${paypalPlugin}" prefix="xasset"/> <tarfileset dir="docs" includes="README.txt" fullpath="xasset/docs/README"/> <tarfileset dir="help" includes="xasset.hlp" prefix="xasset/docs"/> <tarfileset dir="help" includes="xasset.cnt" prefix="xasset/docs"/> <tarfileset dir="class" includes="index.html" prefix="xasset/docs"/> </tar> <bzip2 src="exportsxasset.tar" destfile="exportsxasset.tar.bz2"/> <delete file="exportsxasset.tar"/> </target> <!-- build the paypal plugin --> <zip destfile="exportspaypal.zip"> <zipfileset dir="class/gateways/" includes= "paypal.php"/> <zipfileset dir="class/gateways/" includes="paypalREADME.txt" fullpath="README"/> <zipfileset dir="class/gateways/" includes="paypalLICENSE.txt" fullpath="LICENSE"/> </zip> <tar destfile="exportspaypal.tar"> <tarfileset dir="class/gateways" includes= "paypal.php" /> <tarfileset dir="class/gateways" includes="paypalREADME.txt" fullpath="README"/> <tarfileset dir="class/gateways" includes="paypalLICENSE.txt" fullpath="LICENSE"/> </tar> <bzip2 src="exportspaypal.tar" destfile="exportspaypal.tar.bz2"/> <delete file="exportspaypal.tar"/> </project>
The same logic can then be expanded to distribute files via FTP etc... There are almost no limits.*/