ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KM <>
Subject Re: Question about Copy task with empty PatternSet
Date Wed, 14 May 2014 12:23:09 GMT

Not really giving any specifics - but use the 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.


 From: Roger Whitcomb <>
To: "" <> 
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
   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:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message