Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Excluding a folder in a build file  RSS feed

Jeff Perry
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">
<include name="${ZipFileName}"/>
<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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!