ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wolverine my" <wolverine...@gmail.com>
Subject Exclude files in tarfileset
Date Wed, 11 Apr 2007 13:17:26 GMT
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


Mime
View raw message