You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bh...@prudential.co.uk on 2009/06/03 11:16:07 UTC

Query regarding "includesfile"

Hi ,

I am using Copy task to copy files to a staging directory

<copy todir="${staging.dir}" flatten="yes" verbose="yes">
                        <fileset dir=".">
                                <include name="*\lib\mytech\test\*.*"/>
                                <patternset >
                                        <includesfile name="*\lib\mytech
\files.txt"/>
                                  </patternset>
                        </fileset>
                </copy>


files.txt : It contains list of files names to be copied

*\lib\mytech\test\*.*  :   test folder contains number of ear's to be 
copied


The  includesfile  task in not recognizing the * character.

If I uses My-Deliverables\lib\mytech\files.txt then it works fine but when 
I use pattern its considering * as string.


Could you please help?

Regards,
Bhushan
This email is confidential and should not be used by anyone who is not
the original intended recipient. Prudential cannot accept liability
for statements made which are clearly the sender's own and not made
on behalf of the Prudential. In addition, no statement should be
construed as giving investment advice within or outside the United
Kingdom

Prudential plc, incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 1397169. Prudential plc is a holding company,
subsidiaries of which are authorised and regulated by the Financial
Services Authority (FSA)

'Prudential' is a trading name of The Prudential Assurance Company
Limited, which is incorporated and registered in England and Wales.
Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
Registered number 15454. Authorised and regulated by the Financial
Services Authority. 'Prudential' is also used by other companies within
the Prudential Group, which between them provide a range of financial
products including life assurance, pensions, savings and investment
products

'Prudential' is also a trading name of Prudential Distribution Limited, 
which is incorporated and registered in Scotland.  Registered Office at 
Craigforth, Stirling, FK9 4UE.  Registered number SC212640. Authorised 
and regulated by the Financial Services Authority.

A list of other Prudential companies together with their registered
statutory details can be found in 'About Prudential' on http://www.prudential.co.uk

An email reply to this address may be subject to interception or
monitoring for operational reasons or for lawful business practices.


Re: Delete file inside a warfile

Posted by Michael Ludwig <mi...@gmx.de>.
Knuplesch, Juergen schrieb am 03.06.2009 um 17:55:49 (+0200):

> It would be nice just to delete sth. Out of a jar/war etc. without the
> need to copy the wars around.

Moin Jürgen,

in-situ updates are possible, in-situ deletions aren't. See:

http://java.sun.com/docs/books/tutorial/deployment/jar/update.html

For programmatic usage, I'd give the following classes a try, which
should allow you to hook in a filter to achieve what you want:

* java.util.zip.ZipInputStream
* java.util.zip.ZipOutputStream

Michael Ludwig

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


AW: Delete file inside a warfile

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Hello,

Not really, because I already have a warfile  and want to throw out one jar.

I solved it now in two steps 
1.copying the warfile
2.war the new warfile out of the copy and exclude the specific jar, similar to what you mailed.

It would be nice just to delete sth. Out of a jar/war etc. without the need to copy the wars around.

Greetings Juergen


-- 
Jürgen Knuplesch
-----Ursprüngliche Nachricht-----
Von: Martin Gainty [mailto:mgainty@hotmail.com] 
Gesendet: Mittwoch, 3. Juni 2009 16:34
An: Ant Users List
Betreff: RE: Delete file inside a warfile


http://ant.apache.org/manual/CoreTasks/war.html
<war>
<lib dir="Paket/Faltblatt/lib">
    <exclude name="Schließen.jar"/>
  </lib>
</war>

tut diese Antwort Ihre Frage?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.





> Subject: Delete file inside a warfile
> Date: Wed, 3 Jun 2009 15:02:02 +0200
> From: Juergen.Knuplesch@icongmbh.de
> To: user@ant.apache.org
> 
> Hello,
> 
> Is it possible to delete a single file inside a warfile in one step?
> 
> (I want to remove a certain library)
> 
> Greetings Jürgen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

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


RE: Delete file inside a warfile

Posted by Martin Gainty <mg...@hotmail.com>.
http://ant.apache.org/manual/CoreTasks/war.html
<war>
<lib dir="Paket/Faltblatt/lib">
    <exclude name="Schließen.jar"/>
  </lib>
</war>

tut diese Antwort Ihre Frage?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.





> Subject: Delete file inside a warfile
> Date: Wed, 3 Jun 2009 15:02:02 +0200
> From: Juergen.Knuplesch@icongmbh.de
> To: user@ant.apache.org
> 
> Hello,
> 
> Is it possible to delete a single file inside a warfile in one step?
> 
> (I want to remove a certain library)
> 
> Greetings Jürgen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009

Delete file inside a warfile

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Hello,

Is it possible to delete a single file inside a warfile in one step?

(I want to remove a certain library)

Greetings Jürgen

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


RE: Query regarding "includesfile"

Posted by Martin Gainty <mg...@hotmail.com>.
why are you not you using the **/*.* as specified in the doc?
<fileset dir="/lib/mytech/test" casesensitive="yes">
    <include name="**/*.*"/>
</fileset>
http://ant.apache.org/manual/CoreTypes/fileset.html

are the usage and examples not clear enough?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> To: user@ant.apache.org
> Subject: Query regarding "includesfile"
> From: Bhushan.Khardekar@prudential.co.uk
> Date: Wed, 3 Jun 2009 10:16:07 +0100
> 
> Hi ,
> 
> I am using Copy task to copy files to a staging directory
> 
> <copy todir="${staging.dir}" flatten="yes" verbose="yes">
>                         <fileset dir=".">
>                                 <include name="*\lib\mytech\test\*.*"/>
>                                 <patternset >
>                                         <includesfile name="*\lib\mytech
> \files.txt"/>
>                                   </patternset>
>                         </fileset>
>                 </copy>
> 
> 
> files.txt : It contains list of files names to be copied
> 
> *\lib\mytech\test\*.*  :   test folder contains number of ear's to be 
> copied
> 
> 
> The  includesfile  task in not recognizing the * character.
> 
> If I uses My-Deliverables\lib\mytech\files.txt then it works fine but when 
> I use pattern its considering * as string.
> 
> 
> Could you please help?
> 
> Regards,
> Bhushan
> This email is confidential and should not be used by anyone who is not
> the original intended recipient. Prudential cannot accept liability
> for statements made which are clearly the sender's own and not made
> on behalf of the Prudential. In addition, no statement should be
> construed as giving investment advice within or outside the United
> Kingdom
> 
> Prudential plc, incorporated and registered in England and Wales.
> Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
> Registered number 1397169. Prudential plc is a holding company,
> subsidiaries of which are authorised and regulated by the Financial
> Services Authority (FSA)
> 
> 'Prudential' is a trading name of The Prudential Assurance Company
> Limited, which is incorporated and registered in England and Wales.
> Registered Office at Laurence Pountney Hill, London, EC4R 0HH.
> Registered number 15454. Authorised and regulated by the Financial
> Services Authority. 'Prudential' is also used by other companies within
> the Prudential Group, which between them provide a range of financial
> products including life assurance, pensions, savings and investment
> products
> 
> 'Prudential' is also a trading name of Prudential Distribution Limited, 
> which is incorporated and registered in Scotland.  Registered Office at 
> Craigforth, Stirling, FK9 4UE.  Registered number SC212640. Authorised 
> and regulated by the Financial Services Authority.
> 
> A list of other Prudential companies together with their registered
> statutory details can be found in 'About Prudential' on http://www.prudential.co.uk
> 
> An email reply to this address may be subject to interception or
> monitoring for operational reasons or for lawful business practices.
> 

_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290