Page 1 of 1

ANT buildfile - zipping files from a folder

Posted: Mon Nov 30, 2009 3:07 pm
by JNettles
Apache ANT anyone?

I'm working on an ANT build tool to help speed up our workflow a bit here and I'm stuck on a bit of it, so I'm hoping someone has built an ANT XML file before. :D

Basically, I need to hit a folder (plugins) which has probably twenty different files in it, a pluginZ.php and an accompanying XML file, pluginZ.xml. I have no trouble zipping entire folders with ANT but I'm apparently missing some detail on pulling individual files from a folder to zip. The idea I had is shown in my code here - set the pull directory, exclude every thing in it, and then include the two files I need, but this doesn't work. Any ideas from anyone?

Code: Select all

 
                <zip destfile="${RELEASE_URI}\pluginZ.zip">
                    <zipfileset dir="${JOOMLA}\plugins\authentication">
                        <exclude name="${JOOMLA}\plugins\authentication"/>
                        <include name="${JOOMLA}\plugins\authentication\pluginZ.php"/>
                        <include name="${JOOMLA}\plugins\authentication\pluginZ.xml"/>
                    </zipfileset>
                </zip>