ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Hofmann" <>
Subject TAR Task problems
Date Mon, 23 Jul 2001 22:04:38 GMT

I want tar a some files. One of them is shell script, which needs
the execute flag set after untaring.
The documentation (Ant 1.3) includes the following sample code:

<tar longfile="gnu"
     tarfile="${dist.base}/${}-src.tar" >
  <tarfileset dir="${}/.." mode="755" username="ant" group="ant">
    <include name="${}/"/>
    <include name="${}/"/>
  <tarfileset dir="${}/.." username="ant" group="ant"> 
    <include name="${}/**"/>
    <exclude name="${}/"/>
    <exclude name="${}/"/>

Now, I wonder if that makes any sense. This isn't vaild XML because the tarfilset
element isn't closed by a </tarfileset> tag. Trying the sample above gives me
the following error:

/build/antscripts/build.xml [284] The element type "tarfileset" must be terminated by the
matching end-tag "</tarfileset>".

This is what I expected. I now tried to use <tarfileset>...</tarfilset> which
gives me this error:

/build/antscripts/build.xml [282] Could not create task of type: tarfileset. Common solutions
are to use taskdef to declare your task, or, if this is an optional task, to put the optional.jar
in the lib directory of your ant installation (ANT_HOME).

Now I thought that tar is a core task. BTW I have the optionaljar included.

Using a regular fileset yields:

The <fileset> data type doesn't support the "mode" attribute.

What am I doing wrong?



View raw message