Yep. Found out how. 
FilePath class has the following method
public int 
*zip*(OutputStream<http://download.oracle.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true>
 out, DirScanner <http://javadoc.jenkins-ci.org/hudson/util/DirScanner.html>
 scanner)

And i can use *DirScanner.Glob *to set useDefaultExcludes to false.

Also see http://ant.apache.org/manual/dirtasks.html#patterns for 
default excludes.
(if someone else might have the same questions as i did).


Thanks.
    

On Monday, November 18, 2013 5:41:18 PM UTC+2, Aldrin Leal wrote:
>
> (an educated guess follows)
>
> there's an override for this method which allows you to specify 
> includes/excludes. the one sans this parameter uses the default excludes 
> (which I guess includes .svn/.git)
>
> --
> -- Aldrin Leal, <[email protected] <javascript:>>
> Master your EC2-fu! Get the latest ekaterminal public beta 
> http://www.ingenieux.com.br/products/ekaterminal/
>  
>
> On Mon, Nov 18, 2013 at 12:26 PM, Daniel Anechitoaie 
> <[email protected]<javascript:>
> > wrote:
>
>> Thanks. This led me to the right direction and 
>> using filePathDir.zip(zipOutputStream, "**"); does what i need with one 
>> exception.
>> I've tried to use this method to zip the workspace contents which has 
>> code from SVN and this ignores the .svn folders from there and they are not 
>> zipped.
>> Does this mean that the .git folders will also be ignored or what is the 
>> logic here? How do i know what will get into my zip and what would be left 
>> out?
>> Preferably i would like to have everything in my zip.
>>
>> Thanks. 
>>
>> On Monday, November 18, 2013 2:29:11 PM UTC+2, Daniel Beck wrote:
>>
>>> Please see this Jira comment: 
>>>
>>> https://issues.jenkins-ci.org/browse/JENKINS-19947?
>>> focusedCommentId=187616&page=com.atlassian.jira.plugin.
>>> system.issuetabpanels:comment-tabpanel#comment-187616 
>>>
>>> On 18.11.2013, at 12:16, Daniel Anechitoaie <[email protected]> wrote: 
>>>
>>> > Hi, 
>>> > 
>>> > I see that http://javadoc.jenkins-ci.org/hudson/FilePath.html#zip(
>>> hudson.FilePath) has a really nice method that allows you to quickly 
>>> zip a folder. 
>>> > My issue is that this zips the folder itself and i need to only zip 
>>> the folder contents. 
>>> > Is this possible? 
>>> > 
>>> > 
>>> > Thanks, 
>>> > And sorry but i'm new to Java/Jenkins. 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups "Jenkins Developers" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected]. 
>>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to