ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Reilly" <peter.kitt.rei...@gmail.com>
Subject Re: Exclude files in tarfileset
Date Wed, 11 Apr 2007 14:32:10 GMT
fileset excludes are relative and not absolute.
the ${src} is accually /home/me/somedir/someapps/src
and thus not in the fileset.
Peter


On 4/11/07, wolverine my <wolverine.my@gmail.com> wrote:
> Hi!
>
> I want to do a backup of all my project files except the JARs in
> project/src/main/webapps/WEB-INF/lib directory.
>
> However, the following Ant task (using the src property) will include
> all the JARs in the backup.tar.gz:
>
>   <property name="src" location="src"/>
>
>   <target name="backup" depends="init">
>     <tar destfile="backup.tar.gz" compression="gzip">
>       <tarfileset dir="${basedir}" prefix="${ant.project.name}">
>         <exclude name="${src}/main/webapps/WEB-INF/lib/*.*"/>
>       </tarfileset>
>     </tar>
>   </target>
>
>
> but, the following Ant task (WITHOUT the src property) will not
> include the JARs:
>
>   <target name="backup" depends="init">
>     <tar destfile="backup.tar.gz" compression="gzip">
>       <tarfileset dir="${basedir}" prefix="${ant.project.name}">
>         <exclude name="src/main/webapps/WEB-INF/lib/*.*"/>
>       </tarfileset>
>     </tar>
>   </target>
>
>
> Do you have any idea????
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message