ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Whitcomb <>
Subject Question about Copy task with empty PatternSet
Date Wed, 14 May 2014 00:49:21 GMT
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
   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=""/>

Now there is a Copy task that is putting stuff in the installation directory that looks like
<Copy todir="install/lib">
   <FileSet dir="lib">
      <PatternSet refid="other-jars"/>

(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 "" 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?

~Roger Whitcomb

P.S. Using Ant 1.9.3 if that makes a difference. 

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

View raw message