ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom Hehl <t...@nowhereatall.com>
Subject More exclude problems
Date Mon, 08 Aug 2005 15:47:33 GMT
Thanks to Jan for his excellent and quick answer. I have now built two 
jar files from the one source.

Now, to finish my task, I want to create two distributions. The only 
difference between these two is the two different jar files. Here are my 
tasks:

    <!-- Build the first tar file -->
    <tar tarfile="${tarfile}">
        <tarfileset dir="${distrib}" prefix="rex">
            <exclude name="${distrib}/*.cgi"/>
            <exclude name="${distrib}/*.pl"/>
            <exclude name="${dist-jar2}"/>
        </tarfileset>
        <tarfileset dir="${distrib}" mode="755" prefix="rex">
            <include name="${distrib}/*.cgi"/>
            <include name="${distrib}/*.pl"/>
        </tarfileset>
    </tar>
    <gzip zipfile="${tarfile}.gz" src="${tarfile}"/>
    <delete file="${tarfile}"/>

    <!-- Build the second tar file -->
    <tar tarfile="${tarfile2}">
        <tarfileset dir="${distrib}" prefix="rex">
            <exclude name="${distrib}/*.cgi"/>
            <exclude name="${distrib}/*.pl"/>
            <exclude name="${dist-jar}"/>
        </tarfileset>
        <tarfileset dir="${distrib}" mode="755" prefix="rex">
            <include name="${distrib}/*.cgi"/>
            <include name="${distrib}/*.pl"/>
        </tarfileset>
    </tar>
    <gzip zipfile="${tarfile2}.gz" src="${tarfile2}"/>
    <delete file="${tarfile2}"/>

Where:
  ...
  <property name="distrib" location="./distrib"/>
  <property name="dist-jar" location="${distrib}/rex.jar"/>
  <property name="dist-jar2" location="${distrib}/rexml.jar"/>
  ...
  <property name="tarfile" location="${src}/rex.tar"/>
  <property name="tarfile2" location="${src}/rexml.tar"/>

When I run with debug, I get:

Tar$TarFileSet: Setup scanner in dir 
/home/ThomHehl/src/Javacode/rex/distrib with patternSet{ includes: [] 
excludes: [/home/ThomHehl/src/Javacode/rex/distrib/*.cgi, 
/home/ThomHehl/src/Javacode/rex/distrib/*.pl, 
/home/ThomHehl/src/Javacode/rex/distrib/rexml.jar] }
    ...
      [tar] rexml.jar added as /home/ThomHehl/src/Javacode/rex/rex.tar 
doesn't exist.

Argghhh!!!

Is it just me or is exclude/include unnecessarily touchy?


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


Mime
View raw message