It's not a secret anymore!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Excluding a folder in a build file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Excluding a folder in a build file" Watch "Excluding a folder in a build file" New topic
Author

Excluding a folder in a build file

Jeff Perry
Greenhorn

Joined: Mar 03, 2010
Posts: 1
I am trying to make my builds complete faster. We have one folder on a number of projects that never changes, but is tremendously large. I want to exclude that folder "Workarea". Here is how I do it now:

<delete dir="${DeployLocation}" verbose="true" if="${directory::exists(DeployLocation)}" />
<mkdir dir="${DeployLocation}"/>
<copy todir="${DeployLocation}" flatten="True">
<fileset>
<include name="${ZipFileName}"/>
</fileset>
</copy>
<unzip zipfile="${DeployLocation}/${ZipFileName}" todir="${DeployLocation}"/>
<delete file="${DeployLocation}/${ZipFileName}" verbose="true"/>
<delete file="${ZipFileName}" verbose="true" if="${file::exists(ZipFileName)}"/>

This deletes the entire directory then recreates it, copies the zip file with everything, unzips the file and deletes the zip file. I am going to exclude the "Workarea" folder from the zip file and want to leave it there. This way my builds will complete in 10 minutes rather than 30 minutes. I am just not sure how to change the first line of the code to delete everything other than the workarea folder.

Please help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Excluding a folder in a build file
 
Similar Threads
EJB deployment in weblogic 10.2
Building Seam projects in Eclipse
Zip & delete on the basis of timestamp
Compilation error while building the project using Ant
Web app deployment model depends on build.xml? (Lomboz)