Interesting idea.  Multiple <patternset> elements can be referenced in a 
<fileset>, however, all the referenced <include> and <exclude> directives 
behave as though it were a single <fileset>.  The following has the same effect 
as if all three <include> and <exclude> directives were specified in the same 
<fileset>:


        <patternset id="patternSet1">
                <include name="**" />
                <exclude name="*.txt" />
        </patternset>

        <patternset id="patternSet2">
                <include name="File1.txt" />
        </patternset>

        <target name="PatternSetTest">

                <copy todir="${dstDir}" verbose="true" >
                        <fileset basedir="${srcDir}">
                                <patternset refid="patternSet1" />
                                <patternset refid="patternSet2" />
                        </fileset>
                </copy>

        </target>


From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Friday, April 24, 2009 10:03 AM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Filesets - include / exclude

Thanks for the info Ken. That is how I do it too. I just use multiple copy 
tasks. It always seemed to me that they copy task should support multiple 
fileset sections but it doesn't. Have you perhaps tried using multiple 
paternsets? Sort of like:

<paternset refid="allfileswotext">
   <include name="**" />
   <exclude name="*.txt" />
</paternset>

------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to