You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Aaron Kamienski <aa...@snaptwo.com> on 2001/09/05 20:27:10 UTC

Renaming a file while jarring...

Hello,

Is it possible to effectively rename/move a file while jarring
it (w/out an explicit copy/move)?

For example, I have a file w/x/y.z and I want it to end up in a jar as
a/b/y.z (or, even more generic, a/b/c.d).

I can copy w/x/y.z to a/b before performing the jar task (and 
perhaps delete when done), but I was wondering if there was 
a more elegant way.  A way that doesn't result in unnecessary re-jarring.

thanks,

ajk

-- 
Aaron Kamienski <aa...@snaptwo.com>
SNAP2 Corporation

Re: Renaming a file while jarring...

Posted by Matthew Inger <ma...@sedonacorp.com>.
Matthew Inger wrote:

> Aaron Kamienski wrote:
>
>> Hello,
>>
>> Is it possible to effectively rename/move a file while jarring
>> it (w/out an explicit copy/move)?
>>
>> For example, I have a file w/x/y.z and I want it to end up in a jar as
>> a/b/y.z (or, even more generic, a/b/c.d).
>>
>> I can copy w/x/y.z to a/b before performing the jar task (and perhaps 
>> delete when done), but I was wondering if there was a more elegant 
>> way.  A way that doesn't result in unnecessary re-jarring.
>>
>> thanks,
>>
>> ajk
>>
> I believe you can use a mapper sub-element for this.
> see the ant user manual
>
>
woops.... i mean a zipfileset, not a mapper

-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 




Re: Renaming a file while jarring...

Posted by Matthew Inger <ma...@sedonacorp.com>.
Aaron Kamienski wrote:

>Hello,
>
>Is it possible to effectively rename/move a file while jarring
>it (w/out an explicit copy/move)?
>
>For example, I have a file w/x/y.z and I want it to end up in a jar as
>a/b/y.z (or, even more generic, a/b/c.d).
>
>I can copy w/x/y.z to a/b before performing the jar task (and 
>perhaps delete when done), but I was wondering if there was 
>a more elegant way.  A way that doesn't result in unnecessary re-jarring.
>
>thanks,
>
>ajk
>
I believe you can use a mapper sub-element for this.
see the ant user manual


-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 




Re: Renaming a file while jarring...

Posted by Diane Holt <ho...@yahoo.com>.
--- Aaron Kamienski <aa...@snaptwo.com> wrote:
> Is it possible to effectively rename/move a file while jarring
> it (w/out an explicit copy/move)?
> 
> For example, I have a file w/x/y.z and I want it to end up in a jar as
> a/b/y.z (or, even more generic, a/b/c.d).

Yes -- see the Jar task in the manual, and click on the link to the Zip
task for info on using <zipfileset>.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com