You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rob van Oostrum <ro...@blastradius.com> on 2004/01/21 15:18:36 UTC

Unexpected Jar behavior

I'm working on a build file that splits files into 2 jar files, depending on
whether or not the file contains a given string:

		<jar
destFile="${dest.dir}/delta_${delta.timestamp}_FUNC_TKT${ticket}.jar"
filesonly="true" whenempty="skip" >
			<fileset dir="${temp.dir}/${module}/docs" >
				<contains text="FUNCTIONAL"
casesensitive="true" />
			</fileset>
		</jar>
						
		<jar
destFile="${dest.dir}/delta_${delta.timestamp}_CONT_TKT${ticket}.jar"
filesonly="true" whenempty="skip" >
			<fileset dir="${temp.dir}/${module}/docs" >
				<not>
					<contains text="FUNCTIONAL"
casesensitive="true" />
				</not>
			</fileset>
		</jar>

Whenever the fileset doesn't contain any files, it'll still contain the
directory structure, causing the jar to be created (containing the directory
structure). I would expect the behavior to be consistent with basic <jar>
functionality, i.e. if no files match, the jar is not created. Is this a
problem in the <fileset> implementation?


thanks
Rob

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