ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: TAR Task problems
Date Tue, 24 Jul 2001 00:07:20 GMT
> From: Thomas Hofmann []
> 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="${}/"/>
>   </fileset>
>   <tarfileset dir="${}/.." username="ant" group="ant">
>     <include name="${}/**"/>
>     <exclude name="${}/"/>
>     <exclude name="${}/"/>
>   </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>".

OK, the documentation has already been fixed in CVS.

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

Strange. That would seem to suggest that the <tarfileset> element is defined
at the "top level". That is not allowed. It must be nested in the <tar>
task. Can you please send the build file as it now stands.


View raw message