ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: What is wrong with this command?
Date Sat, 25 Oct 2003 16:03:10 GMT
> From: Zsolt Koppany []
> I never want to release "*.sql" files, and some other (JSP files) unless
> the
> "INTERNAL" Ant property is set, but in my case the jsp files are always
> copied. How can I fix this problem?
> <fileset id="web_files" dir="web" excludes="**/*.sql">
> 	<not>
> 		<selector unless="INTERNAL">
> 			<filename
> name="**/generateCode.jsp,**/showGeneratedCode.jsp" />
> 		</selector>
> 	</not>
> </fileset>

It's a common misconception that <include name="X"/> and some other elements
can take comma-separated list of stuff. This is not so. Yes, it's confusing
because what's not true above, is for <target depends="X,Y,Z"/> and also for
<fileset includes="X,Y,Z"/>... That's just one the wrinkles of Ant, for the
worthy goal of backward compatibility.

Here's something that should work for your situation, without selectors:

<fileset id="web_files" dir="web">
  <exclude name="**/*.sql" />
  <exclude name="**/generateCode.jsp" unless="INTERNAL" />
  <exclude name="**/showGeneratedCode.jsp" unless="INTERNAL" />


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message