Not really giving any specifics - but use the support.abc property when checking the copy as well, e.g. make a target/task or if the copy would support the check use it there. I'd have to look up the syntax etc.
Or make the whole pattern set and copy a target/task and check for the property. KM ________________________________ From: Roger Whitcomb <rogerandb...@rbwhitcomb.com> To: "user@ant.apache.org" <user@ant.apache.org> Sent: Tuesday, May 13, 2014 8:49 PM Subject: Question about Copy task with empty PatternSet Hi all, I was banging my head against the wall for several hours today on this problem and came up with a tolerable solution. But I thought I would ask to see if others might have a better solution. The situation is: we have a product that can be built to support several different feature sets. There are properties set (or not) depending on which features to support. Now a new feature requires some new .jar files which are not needed by any other feature. I have a PatternSet with these .jar files listed: <PatternSet id="other-jars"> <include name="abc*.jar" if="support.abc"/> </PatternSet> Now there is a Copy task that is putting stuff in the installation directory that looks like this: <Copy todir="install/lib"> <FileSet dir="lib"> <PatternSet refid="other-jars"/> </FileSet> </Copy> (I'm not doing a copy/paste here, just from memory, so be easy if there are syntax errors--hopefully you get the drift.) Now the problem is: if "support.abc" is not defined, the PatternSet is empty and the FileSet thinks it should copy everything in the source directory to the target. But what I want is to copy nothing. So, any thoughts / suggestions as to how to achieve what I want? Thanks, ~Roger Whitcomb P.S. Using Ant 1.9.3 if that makes a difference. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org