ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varnavas, Frank" <frank.varna...@gs.com>
Subject RE: <tar> problems
Date Mon, 11 Jun 2001 15:52:04 GMT
I think the basedir= attribute in the <tar> entity is creating another
fileset

-----Original Message-----
From: Mike Schiraldi [mailto:raldi@research.netsol.com]
Sent: Monday, June 11, 2001 10:00 AM
To: ant-user@jakarta.apache.org
Subject: <tar> problems


I'm having some problems with <tar>. Let's say i have the following files:

$ find . 
.  
./build.xml 
./bin 
./bin/script.sh 
./etc 
./etc/foo 
./bad
./bad/do_not_include_this 

I'd like everything in bin to be added with mode 755, everything in etc to
be added as-is, and nothing from bad/ included. Here's my build.xml. As far
as i can tell, i'm following the instructions in the ant docs. However, ant
just tars up everything.

$ cat build.xml 
<?xml version="1.0"?>

<project basedir=".">
  <target name="dist">
    <tar
      basedir="." 
      tarfile="test.tar">
      
      <tarfileset mode="755" dir=".">
      <include name="bin/**"/>
      </tarfileset> 

      <tarfileset dir=".">
      <include name="etc/**"/>
      </tarfileset>
    </tar>
  </target>
</project>

$ ant dist
Buildfile: build.xml

dist:
      [tar] Building tar: /tmp/test.tar

BUILD SUCCESSFUL

Total time: 2 seconds
$ tar -tf test.tar 
bin/script.sh
etc/foo
build.xml
bin/script.sh
etc/foo
bad/do_not_include_this

Mime
View raw message