ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: Attempting to split the same package into two jars
Date Fri, 04 Feb 2005 15:37:20 GMT
> From: Gerard Janssen [mailto:geejee@janssenenjansen.nl]
> 
> use:
> <jar jarfile="${dist_dir}/${dist_bof_file}" >
> 	<fileset dir="${comp_sun_dir}">
> 		<include name="com/foo/sbo/**/*">
> 		<include name="com/foo/tbo/**/*">
>         </fileset>
> </jar>
> 
> use:
> <jar jarfile="${dist_sun_dir}/${dist_sun_file}">
> 	<fileset dir="${comp_sun_dir}">
> 		<exclude name="com/foo/sbo/**/*"/>
> 		<exclude name="com/foo/tbo/**/*"/>
> 	</fileset>
> </jar>

I second that, and would just add that to avoid duplicating the include/exclude patterns (and
avoid the possibility they become out of sync) when you want to segregate the files of a directory
in two like this, use this pattern:

<jar jarfile="jar#1">
  <fileset dir="sources">
    <selector id="sources#1">
      <filename name="com/foo/bar/**" />
      ...
    </selector>
  </fileset>
</jar>

<jar jarfile="jar#2">
  <fileset dir="sources">
    <!-- implicitly grabs everything, minus sources#1 -->
    <not>
      <selector refid="sources#1" />
    </not>
  </fileset>
</jar>

The <filename> selector behaves the same as <include> or <exclude>. --DD

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


Mime
View raw message