Hi,
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}/${dist.name}-src.tar" >
<tarfileset dir="${dist.name}/.." mode="755" username="ant" group="ant">
<include name="${dist.name}/bootstrap.sh"/>
<include name="${dist.name}/build.sh"/>
</fileset>
<tarfileset dir="${dist.name}/.." username="ant" group="ant">
<include name="${dist.name}/**"/>
<exclude name="${dist.name}/bootstrap.sh"/>
<exclude name="${dist.name}/build.sh"/>
</fileset>
</tar>
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?
Thanks.
Thomas