ANT buildfile - zipping files from a folder

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
JNettles
Forum Contributor
Posts: 228
Joined: Mon Oct 05, 2009 4:09 pm

ANT buildfile - zipping files from a folder

Post 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>
 
Post Reply