ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "glenn opdycke-hansen" <glenn...@gmail.com>
Subject Re: tar with tarfileset
Date Wed, 29 Mar 2006 15:10:16 GMT
I would remove the basedir from the tar statement, since the tarfileset
should select the files you want:

       <tar tarfile="my.tar" >
           <tarfileset dir="${basedir}" prefix="/anyprefix">
               <include name="lfile1"/>
               <include name="file2"/>
               <include name="file3"/>
           </tarfileset>
       </tar>


On 3/29/06, Yves Willems <ywillems@maia-scientific.com> wrote:
>
> Hi all,
>
>
>
> I want to make a tar file holding just 3 files, but prefixed with a
> certain
> directory name.
>
> I created the following target:
>
>
>
> <target name="make.tar">
>
>         <tar tarfile="my.tar" basedir="${basedir}">
>
>             <tarfileset dir="${basedir}" prefix="/anyprefix">
>
>                 <include name="lfile1"/>
>
>                 <include name="file2"/>
>
>                 <include name="file3"/>
>
>             </tarfileset>
>
>         </tar>
>
> </target>
>
>
>
> However when I run this thing it adds recursively ALL files under the
> basedir directory to my tar file.
>
> What am I doing wrong?
>
>
>
> (I'm running 1.6.5)
>
>
>
> Yves
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message