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
>
>
>
|