Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Excluding a folder in a build file

 
Jeff Perry
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic