ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Zip file/folder only if present
Date Wed, 27 Jun 2007 06:42:51 GMT
no
http://ant.apache.org/manual/dirtasks.html#patterns

Jan 

>-----Urspr√ľngliche Nachricht-----
>Von: Parag P. Doke [mailto:paragpdoke@gmail.com] 
>Gesendet: Dienstag, 26. Juni 2007 18:15
>An: Ant Users List
>Betreff: Re: Zip file/folder only if present
>
>Hi Jan.
>Thank you for your email.
>Just one question about lines:
>>         <include name="Folder1/" />
>>         <include name="Folder2/" />
>If I'm not mistaken, I could use:
><include name="[Ff][Oo][Ll][Dd][Ee][Rr][0-9]/" />
>
>Is that right ?
>
>Thanks in advance,
>Parag P. Doke
>
>
>On 6/26/07, Jan.Materne@rzf.fin-nrw.de 
><Jan.Materne@rzf.fin-nrw.de> wrote:
>> Try a combination like
>>
>>
>> <available property="folder.present" ... />
>> <target ... if="folder.present">
>>     <zip ... />
>> </target>
>>
>>
>> With <available> you ensure that the folder is present.
>> The targets will only be executed if the property is set.
>> So inside the target you can be sure that the folder is present
>> (if you dont set the property otherwise ;)
>>
>>
>>
>> If you know that the base directory WILL exist you could 
>include pattern.
>> <zip>
>>     <fileset dir="EXISTINGDIR">
>>         <include name="Folder1/" />
>>         <include name="Folder2/" />
>>
>>
>>
>> Jan
>>
>>
>> >-----Urspr√ľngliche Nachricht-----
>> >Von: Parag P. Doke [mailto:paragpdoke@gmail.com]
>> >Gesendet: Dienstag, 26. Juni 2007 08:56
>> >An: user@ant.apache.org
>> >Betreff: Zip file/folder only if present
>> >
>> >Hi All.
>> >I'm an ant newbie running version 1.7.0 on NTish Windows 
>and Unix. My
>> >intent was to write a tiny build script that zips up certain
>> >files/folders if they are present. I was trying with the 
>zip task and
>> >the zipfileset fileset with regexps. However, it seems like 
>this works
>> >only if the referenced file/folder exists (else fails). 
>Also, regexps
>> >do not seem to work.
>> >
>> >There is definitely the other option of running copy with 
>failonerror
>> >set to false....but I thought of asking if someone knew how to use
>> >zipfileset without having to copy the contents.
>> >
>> >ParentFolder <- Fixed / known name
>> >|- Folder1/installer/logs <- Case of "Folder1" is uncertain
>> >|- FOLDER2/installer/logs <- Case of "FOLDER2" is uncertain 
>(might not
>> >exist in each case - if the 2nd installer fails, this does not get
>> >created)
>> >|- installer/logs
>> >|- installOptions.htm <- Wish to zip up all *htm* files
>> >
>> >I am interested in using the prefix attribute of the 
>zipfileset task.
>> >After unzipping, the files are created without the ParentFolder
>> >directory. Can someone share his/her experiences about the same ? An
>> >existing document explaining the process / logic will also be fine.
>> >
>> >Thanks in advance,
>> >--
>> >Parag P. Doke
>> >http://paragpdoke.blogspot.com
>> >
>> 
>>---------------------------------------------------------------------
>> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> >For additional commands, e-mail: user-help@ant.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
>
>-- 
>Parag P. Doke
>http://paragpdoke.blogspot.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message