On Thu, Aug 21, 2008 at 9:47 AM, Ittay Dror <[EMAIL PROTECTED]> wrote:
> Hi,
>
> It looks like the only way to define files to be added to a zip is during
> the creation of the ZipTask (in package_as_xxx). Is this the case?
Why do you want to override the package_as_xxx method instead of using
"package(:zip).include _('target/docs')"?
> If so, it pauses several issues for me:
> 1. The code for adding the files runs for all projects, even if I just build
> a sub project. If there are many projects and the code to finding the files
> is not trivial, this creates a performance issue.
>
> 2. The files may not exist yet. If they are created by some other task (and
> not known beforehand), how can they be added? (after the task runs, it can
> keep a list of the files it created)
When I need to keep a list of files, I create a subdirectory in the
target directory for this purpose. For instance, I would
1. create the directory 'target/files_for_my_zip'
2. define tasks so that their output goes to 'target/files_for_my_zip'
3. define the zip task so that it includes 'target/files_for_my_zip'
4. add dependencies between the tasks creating the files and the zip
task, if needed
Lacton