Okay, I have a generic/global build file that I think is very clean and
nearly works. The only limitation I have now is that Nant doesn't
recognize/utilize <foreach> loops within the <webmap> node.
<property name="webmap.file"
value="${path::combine(work.dir,webmap.name)}"
readonly="true" />
<target name="debug" depends="update">
<if test="${not file::exists(webmap.file)}">
<solution ... />
</if>
<if test="${file::exists(webmap.file)>
<solution ... >
<webmap>
<foreach ... property="url,path">
<map url="${url}" path="${path}" />
</foreach>
</webmap>
</solution>
</if>
</target>
I am willing (and probably able) to make the changes to Nant itself to
get it to process the <foreach> inside the <webmap>, but I have a few
"philosophical" questions for you all.
Is this a good idea?
Would it be considered generally useful?
Is it likely to be adopted into the project so that I don't have to
integrate the change on every new Nant release?
Can anyone help me out a bit by pointing out where I can find the
existing <foreach> implementation and where I need to modify the
<webmap> processing?
Thanks in advance for your consideration and feedback.
Tony
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Selke,
Anthony
Sent: Tuesday, April 19, 2005 11:22 AM
To: Gary Feldman; [email protected]
Subject: RE: [Nant-users] Trying to abstract the <webmap> section.
Importance: Low
> Does CI mean "check in " or "continuous integration"?
Sorry ... continuous integration, though I am doing my testing running
Nant directly from the command line.
> NAnt only deals with the if/unless/ifnot control facilities at the
> task level.
Ouch. I really hoped to avoid building the file from scratch (hence the
<solution> tag). What about the <foreach> node? I have the following:
<target name="debug" depends="update">
<if test="${webmap.exists}">
<foreach item="Line" in="webmap.config" delim="|"
property="url,path">
<echo message="URL = '${url}'" />
<echo message="PATH = '${path}'" />
</foreach>
<solution ... >
<webmap>
<foreach item="Line" in="webmap.config" delim="|"
property="url,path">
<map url="${url}" path="${ccnet.working.directory}\${path}" />
</foreach>
</webmap>
</solution>
</if>
</target>
The result is this:
debug:
[echo] URL = 'http://localhost/Project.Web/Project.Web.csproj'
[echo] PATH = 'Project.Web\Project.Web.csproj'
[solution] Starting solution build.
BUILD FAILED
Cannot build web project
'http://localhost/Project.Web/Project.Web.csproj'. Please use <webmap>
to map the given URL to a project-relative path, or specify
enablewebdav="true" on the <solution> task element to use WebDAV.
So the <foreach> is working, but it appears to be ignored within the
<webmap> tag (whereas the <if> node actually threw an error).
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime
info, new features, or free trial, at:
http://www.businessobjects.com/devxi/728
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users