On 6/3/05, Sandeep <[EMAIL PROTECTED]> wrote:
> Please let me know if you have any idea to handle this problem more
> elegantly. 

In Ant, this would be handled using a custom mapper[1] on the copy
task.  Personally, I think that's a little heavy-handed, and
ultimately hard to maintain, just because the definition of the
mapping is held in custom source, not the build file.

In NAnt as it currently stands, you will need to try something else...
the foreach loop would work, as would a custom script or task.  Try it
out, and see if the performance is good enough for your requirements. 
As you mentioned, you can copy everything outside the release folder
normally, and fall back to the looping method for files inside
release.


Alternatively, if you have one or a small (fixed) number of release
folders in the path you are copying, then you can perform the copy
using two or a small (fixed) number of copy tasks:

(assuming one release folder: foo/bin/release)
<copy todir="${target.dir}">
  <fileset basedir="${foo.dir}">
    <excludes="**/release/**" />
  </fileset>
</copy>
<copy todir="${target.dir}/bin">
  <fileset basedir="${foo.dir}/bin/release" />
</copy>




[1] http://ant.apache.org/manual/CoreTypes/mapper.html

Regards,

-- 
Troy


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to