ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas.Sas...@sybase.com
Subject RE: Re: Tar base directory question
Date Mon, 11 Mar 2002 12:54:36 GMT
Daz,

That worked perfectly.  Rock on!

-T

-----Original Message-----
From: Darrell DeBoer <darrell@apache.org>
Sent: Saturday, March 09, 2002 8:46 AM
To: "Ant Users List" <ant-user@jakarta.apache.org>
Cc:
Subject: Re: Tar base directory question


Hi Tom,
<tar tarfile="xxx">
    <tarfileset dir="{parent dir of dist}">
        <include name="dist/**" />
    </tarfileset>
</tar>
should do what you want.

hope this helps
ciao
Daz

Unfortunately, there's no "prefix" attribute on tarfileset, as there is
with
zipfileset, so you'll need a workaround.
On Sat, 9 Mar 2002 03:25, Thomas.Sasala@sybase.com wrote:
> I'm trying to create a tar ball with a specific base directory
> included in the tar file.  For example, I have a "dist" directory
> that I want to tar for distribution.  However, when I set
> the base directory as "dist", I get the files in the dist
> directory, but tar does include "dist" as part of the
> file path.  So when users extract the tar, all the files
> end up in the directory where it was extracted.  What I
> want is to have "dist" as the base directory inside the
> tar.  For Example:
>
> dist/jdom.jar
> dist/html/index.html
> etc.
>
> instead of:
>
> jdom.jar
> html/index.html
>
> No matter what I set base dir or tarfileset to, I can't get the
> tar task to include the base directory.  Any suggestions on
> how to fix this problem?  I've searched the web, the archives,
> and news groups without any luck.  Thanks.
>
> -Tom

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




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


Mime
View raw message