All,
I stumbled into this one today. If you use a <fileset> task by itself
in a target, all is ok; but if you put that task inside of a <choose> it
fails.
Example script:
<project name="a">
<property name="deploy.root" value=""/>
<target name="go">
<choose>
<when test="${string::get-length(deploy.root)==0}">
<fileset id="deploy.clean.fileset" basedir="${deploy.root}">
<include name="**\*.*"/>
</fileset>
</when>
<otherwise>
<echo>In the OTHERWISE</echo>
</otherwise>
</choose>
</target>
</project>
Here is the output:
C:\build\Titan>nant -f:a.build go
NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net
Buildfile: file:///C:/build/Titan/a.build
Target framework: Microsoft .NET Framework 2.0
Target(s) specified: go
go:
BUILD FAILED
C:\build\Titan\a.build(6,6):
Unknown task <fileset>.
Total time: 0 seconds.
Doesn't matter if you put the <fileset> in the <when> or the
<otherwise>, you always get "Unknown task <fileset>." Remove the
<choose> altogether and it works fine. I'm using Windows XP SP2, you
can see the version of NAnt in the output and the newest available
NAntContrib.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
NAnt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users