You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Peter Donald (JIRA)" <ji...@apache.org> on 2012/10/07 01:49:04 UTC

[jira] [Updated] (BUILDR-186) archive task with "sparse" files

     [ https://issues.apache.org/jira/browse/BUILDR-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald updated BUILDR-186:
--------------------------------

    Fix Version/s: 1.5
    
> archive task with "sparse" files
> --------------------------------
>
>                 Key: BUILDR-186
>                 URL: https://issues.apache.org/jira/browse/BUILDR-186
>             Project: Buildr
>          Issue Type: Wish
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.5
>
>
> (from an email thread)
> I asked: 
> > I want to build a zip by picking out specific files.
> > >
> > > Say my tree is
> > > a/
> > >  b/
> > >   c/
> > >     D.class
> > >     E.class
> > >   f/
> > >     G.class
> > >     H.class
> > >
> > > I want to package D.class and G.class only.
> > >
> > > What is the cleanest way of doing that?
> > >
> > > The cleanest way seems to me if I could pass the task a base directory and a
> > > list of relative paths so it will include the paths in the zip (as-is) taken
> > > from expanding them with the base directory (e.g., zip('a/b/c/D.class',
> > > 'a/b/f/G.class', :base => compile.target, :as-is => true))
> > >
> > > AFAIK, I can do:
> > > zip.include("#{compile.target}/a/b/c/D.class", :as => 'a/b/c/D.class')
> > > zip.include("#{compile.target}/a/b/f/G.class", :as => 'a/b/f/G.class')
> > >
> > > or:
> > > zip.path('a/b/c').include("#{compile.target}/a/b/c/D.class")
> > > zip.path('a/b/f').include("#{compile.target}/a/b/f/G.class")
> > >
> > > or:
> > > ['a/b/c/D.class', 'a/b/f/G.class'].each do |path|
> > >  zip.include("#{compile.target}/#{path}", :as => path
> > > end
> Assaf Says: 
> :base would be easiest because you can specify multiple files/patterns
> in a single include.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira