ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <Ste...@ignitesports.com>
Subject I thought I understood the jar task
Date Fri, 31 May 2002 13:02:41 GMT
and file exclusion/inclusion, but it appears I don't.  Can someone please explain WHY I get
the following results:

Two ways to specify creation of a jar.  I think they should produce the same results but they
don't.
1.
        <jar destfile="${dist.dir}/lib/ism/RankAPI.jar" basedir="${build.classes}" >
            <fileset dir = "${build.classes}" >
                <exclude name="**/headlines/**"/>
                <exclude name="**/RankServiceFactory*.class"/>
            </fileset>    
        </jar>
2.
        <jar destfile="${dist.dir}/lib/ism/RankAPI.jar" basedir="${build.classes}" 
            excludes="**/headlines/**, **/RankServiceFactory*.class">
        </jar>

Method 1 produces this jar listing:
     0 Fri May 31 07:58:18 CDT 2002 META-INF/
    58 Fri May 31 07:58:18 CDT 2002 META-INF/MANIFEST.MF
     0 Fri May 31 07:58:18 CDT 2002 com/
     0 Fri May 31 07:58:18 CDT 2002 com/ignitesports/
     0 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/
     0 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/headlines/
     0 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/
  3817 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/headlines/Headline.class
  8245 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/headlines/HeadlineDAO.class
  1286 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/headlines/HeadlineGroupType.class
  2750 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/HTTPRankServiceProxy.class
   702 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankException.class
   233 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankService.class
  1897 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory$1.class
  2196 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory$2.class
  2203 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory$3.class
  2189 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory$4.class
  2301 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory$5.class
  5795 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory$6.class
 13073 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceFactory.class
  1535 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceType.class
  2750 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/HTTPRankServiceProxy.class
   702 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankException.class
   233 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankService.class
  1535 Fri May 31 07:58:18 CDT 2002 com/ignitesports/sportswire/rank/RankServiceType.class
We see duplications and inclusion of some files I thought I was excluding.

Method 2 produces what I want.
     0 Fri May 31 07:54:30 CDT 2002 META-INF/
    58 Fri May 31 07:54:30 CDT 2002 META-INF/MANIFEST.MF
     0 Fri May 31 07:54:28 CDT 2002 com/
     0 Fri May 31 07:54:28 CDT 2002 com/ignitesports/
     0 Fri May 31 07:54:28 CDT 2002 com/ignitesports/sportswire/
     0 Fri May 31 07:54:28 CDT 2002 com/ignitesports/sportswire/rank/
  2750 Fri May 31 07:54:28 CDT 2002 com/ignitesports/sportswire/rank/HTTPRankServiceProxy.class
   702 Fri May 31 07:54:28 CDT 2002 com/ignitesports/sportswire/rank/RankException.class
   233 Fri May 31 07:54:28 CDT 2002 com/ignitesports/sportswire/rank/RankService.class
  1535 Fri May 31 07:54:28 CDT 2002 com/ignitesports/sportswire/rank/RankServiceType.class

Why the difference?  What is the interplay between the basedir attribute and the filesets?
 I had thought basedir was essential for specifying the root of the tree from which jar will
label the folders in the jar file and the the filesets fully specified what was to be included
and what not included.  But appararently I misunderstood.

I think the documentation here is pretty weak, particularly the definition of what basedir
does.

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


Mime
View raw message