Hi Rune,

The in attribute does not support wildcards, so you should actually use the
nested <in> element and its <items> fileset :

 <target name="init" description="Initializes the build.">
  <foreach item="Line" delim="," property="name,value">
   <in>
    <items>
     <includes name="**/*.properties" />
    </items>
   </in>
   <do>
    <echo message="Setting solution property: [${name}=${value}]"/>
    <property name="${name}" value="${value}"/>
   </do>
  </foreach>
 </target>

Hope this helps,

Gert

----- Original Message ----- 
From: "Rune Holm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 06, 2003 10:56 AM
Subject: [nant-dev] Bug report


Hi nant dev crew

I don't know the guidelines for a bug report (and I can't find it on the
homepage), so here goes.

I am trying to make a standard solution build file and then include the
specific details for a solution in a property file (could alternatively be
an .include file). The problem is that I would like to name the property
file *.property (or *.include), so you can use the StandardSolution.build
with any property file. When I call:

<target name="init" description="Initializes the build.">
<foreach item="Line" in="*.properties" delim="," property="name,value">
<echo message="Setting solution property: [${name}=${value}]"/>
<property name="${name}" value="${value}"/>
</foreach>
</target>

I get the follow error:


BUILD FAILED

INTERNAL ERROR

System.ArgumentException: Illegal characters in path. at
System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[]
str) at
System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAcc
ess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean
needFullPath, Boolean copyPathList) at
System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess
access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path) at
NAnt.Core.Project.GetFullPath(String path) in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tmp\src\NAnt.Core\Project.cs:line
894  at NAnt.Core.Tasks.LoopTask.ExecuteTask() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tmp\src\NAnt.Core\Tasks\LoopTask.cs
:line 320 at NAnt.Core.Task.Execute() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tmp\src\NAnt.Core\Task.cs:line
151at NAnt.Core.Target.Execute() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tmp\src\NAnt.Core\Target.cs:line
207 at NAnt.Core.Project.Execute(String targetName) in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tmp\src\NAnt.Core\Project.cs:line
753 at NAnt.Core.Project.Execute() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tm
p\src\NAnt.Core\Project.cs:line 729 at NAnt.Core.Project.Run() in
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\tmp23.tmp\sr
c\NAnt.Core\Project.cs:line 778

Please send bug report to [EMAIL PROTECTED]

Regards
Rune Holm
System Architect, Infopaq International A/S



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to