Shelly Midha wrote:

I've defined a property as follows in a property file:



<property name="File_To_Include.List" value="*.java;*.sql;*.class"/>



There can be other options that I want to include in the list.



I want to use the added options in the filelist as mention in the following task, wherein I'm mentioning each possible option explicitly.



<zip zipfile="${zipfilename}" ziplevel="9">
<fileset basedir="${build.path}">
<include name="**/*.java"/>
<include name="**/*.sql"/>
</fileset>
</zip>




Is there a possibility to do the same by setting some property values, instead of hard coding it.

It's possible to use the <foreach> task to iterate through a comma-separated list. However, I don't believe it's possible to build up the fileset dynamically that way. What you can do is to create a temporary NAnt build file on the fly, containing just one target, which would contain the zip task with the correct fileset. It's conceivable that some filterchain might
be put to use for this, but I'd use brute force. The NAntContrib
<concat> task comes in handy for this.


Gary




------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. Get your fingers limbered up and give it your best shot. 4 great events, 4 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to