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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to