[NAnt-users] New to list - How best to create if-else-endif construct ...

2008-01-23 Thread Parrish, Ken
I'm new to this list, so am not sure if this question has been posted
frequently or recently.

 

I'm often frustrated when I need to create an if-else-endif construct in
a Nant script.  For example:

 

  target name=unitTest description=runs nunit tests on the
project   e
if test=${target::exists('unitTestCustom')} 
  echo message=Calling custom NUnit target ... /
  call target=unitTestCustom /
/if
if test=${not target::exists('unitTestCustom')} 

  echo message=Standard NUnit processing ... /

/if
  /target



Seems really messy to me.  The test is executed multiple times and is
prone to mistakes if the conditional is not corrected in both places.

 

In the case of a test that validates a potential failure, I've used:

 

  target name=unitTest description=runs nunit tests on the
project   e
if test=${target::exists('dontDoThis')} 
  echo message=Not something I want to do ... /
  fail message=Bad target - exiting ... /
/if

echo message=Standard NUnit processing... /

  /target



Any ideas on a better way to create if-else-endif conditional blocks?

 

Thanks,

 

Ken

Gomez, Inc.

 

 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] VS2005 Web Projects; still trying

2008-04-17 Thread Parrish, Ken
Tony,

I have done quite extensive work with VS2005 web-based projects and
Nant--have tried a large variety of combinations.

This is what seems to work the best for us:

1)  Add to your web solution a web deploy project and send the output to
a 'staging' directory.  A web deploy project will 'stage' your web site
to a separate 'staging' directory.  In addition, the web deploy project
can be configured to pre-compile your aspx files to one or a collection
of assembly DLLs.  The web deploy project will create these and put the
in the runtime image generated in the 'staging' directory.
 
2)  Use MSBuild to build your solution.  Incorporate MSBuild task
support into Nant by adding the NantContrib package to your Nant
installation.

3)  Pay careful attention to the MSBuild temporary directory and the web
deploy target directories to insure they don't conflict with your
working source directory.

4)  Add additional Nant targets, or expand your targets to customize the
resulting staged, runtime image of your application.  For example,
folding in external OEM or separately developed projects or code.

It is possible to customize the MSBuild project file in a web deploy
project, but I found it to be difficult and cumbersome.  I had much
better success with the Nant file and directory tasks for fine-tuning my
staged images.

Let me know if you need any more info--happy to help.

Ken Parrish
Gomez, Inc.
Lexington, MA



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony
Selke
Sent: Thursday, April 17, 2008 8:19 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] VS2005 Web Projects; still trying

So I have been playing with this some more and I have some more context 
and a new theory.  :-)

When you use Visual Studio to add a website from the file system, there 
is no *.[cs|vb]proj file.  It's just a directory.  And this is how it 
gets written to the VS2005 solution file, like so:

Project({GUID}) = C:\...\PMI\, RootNS.Web.Portal.UI.Search\PMI, 
{GUID}

Now, add to that this known feature in Windows, where directories are 
read only and you can't effectively change it (BTW, their attrib 
work-around still leaves my directories read-only, but the files are 
fine and all other non-web NAnt solution tasks work flawlessly):

http://support.microsoft.com/kb/326549/

When you use the NAnt solution task, it uses the solution file to 
figure out what projects to build and where they are located.  In the 
case of web projects, it has map elements to convert the URLs to 
physical file paths.  This is all well and good if you use IIS for your 
web projects.

So here's the part where my facts turn to conjecture and hypothesis:

Unfortunately, this seems to break-down when using path-based web 
projects.  There is no effective way to use the map elements that I 
have found and left to its own devices, NAnt appears to try and open 
the directory it finds in the solution where it expects a project. 
Since the directory is read-only, I get the somewhat misleading, but 
perfectly accurate access denied error.

Does anyone have any experience using NAnt in general and/or the 
solution task in particular to build file-based web site projects in 
Visual Studio 2005?

Tony

Tony Selke wrote:
 I am converting our MSBuild scripts to NAnt and most of our solutions 
 have been happily compiling using the solution task.  We do have a 
 handful of ASP.NET applications that need to be compiled as well, but
I 
 am having trouble getting this to work.  I am using the NAnt 0.86 
 nightly build from 02-10-2008 so that I can get VS2005 support.  I am 
 not running IIS and I would prefer not to need to do so on my build
server.
 
 My simplest example is a test wrapper web site that is the testing 
 project for a custom WebPart.  This solution has one project that 
 generates a class library (with the web part) and another project
that 
 is just a web site in a file directory.  The project definitions from
my 
 solution file are shown below if it helps.
 
 So I have been trying the following solution task (hopefully the 
 property names are descriptive enough):
 
 solution configuration=${BuildConfig} includevsfolders=true
 outputdir=${OutputRoot}\${BuildConfig}\${SolutionName}
 solutionfile=${SourceRoot}\${SolutionName}.sln failonerror=true
 verbose=${VerboseOutput}
  assemblyfolders
  include name=${ReferenceRoot}\${BuildConfig} /
  /assemblyfolders
  !--
  webmap
  map url=http://localhost/PMI/${SolutionName}.csproj;
  path=${SourceRoot}\${SolutionName}\${SolutionName}.csproj
  casesensitive=false /
  /webmap
  --
 /solution
 
 I have tried with and without the webmap and I have tried a webmap
who's 
 URL was a file:// pointing to the website directory.  I always get the

 error:
 
 Error checking whether 
 'C:\APS\PMI\Dev\RootNS.Web\RootNS.Web.Portal.UI.Search\PMI' is an 
 enterprise template project.
Access to the path 
 

Re: [NAnt-users] MS Visual Studio 2005 Solution files and msbuildcommand

2008-04-29 Thread Parrish, Ken
Scott,

 

The following works for me:

 

msbuild project=${solutionFileName}
target=build 
arg
value=/p:Configuration=${buildConfiguration} /
/msbuild/



Where buildConfiguration is either Debug or Release  and
solutionFileName is the full path to your solution file.

 

Ken Parrish

Gomez, Inc.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Mitchell
Sent: Tuesday, April 29, 2008 2:11 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] MS Visual Studio 2005 Solution files and
msbuildcommand

 

I hope someone here can help me.

 

I am new to NANT. So please forgive me if I am overlooking something.

 

My problems is using VS 2005 solution files and NANT. I understand from
the documentation that 2005 Solution files can not be used when using
the NANT solution command. So it was suggested on one of the posts in
archives for this list that msbuild be used. But I have problems with
that also.

 

Here is the lines from my .build file that should build the solution
file. It launches the solution file, and does the build but I get all
kinds of errors when building through this, whereas if I launch the .sln
file myself and do the build that way it works fine with now errors. One
of the things that I noticed is that I need to set the buildtype =
release. How would I do that with this command? I can't seem to find any
examples on using msbuild command. 

 

target name=buildBuilder

msbuild
project=${local.chekout.path}\lightnet\lights32\lights32.sln/

/target

 

This should be a lot easier than I am making it out to be, and I am sure
I am just missing something, but I can't seem to figure it out.

 

Any sort of help would just be greatly appreciated.

 

Thanks,

Scott Mitchell

 

--

Scott Mitchell

Engineering

 

Colorado vNet

 

direct 970 203 3756

main 970 203 3700

fax 970 203 3701

 

email [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

web www.coloradovnet.com http://www.coloradovnet.com 

 

255 East Sixth Street

Loveland, Colorado 80537

 

 

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Property values as a property name ...

2008-06-04 Thread Parrish, Ken
Is there any way in Nant to use the value of one property as the name of
another property?

 

Here is a sketch of what I want to do, but this will not parse/compile:

 

  property name=destination value=PROD/
  property name=PRODDirectories
value=//TPNDC1AS01/wwwroot,//TPNDC1AS02/wwwroot,//TPNDC1AS03/wwwroot/

  target name=directoryTest 

!--
  Construct the name of property to access
--
property name=destinationDirsName
value=${destination}Directories/

!--
  Fetch the property represented by the value of the
name:
--   
property name=destDirs value=${ ${destDirsName} }/
!-- Doesn't parse/compile. --

foreach item=String property=deployDir in=${destDirs}
delim=, 
  echo message=deployDir = ${deployDir} /
/foreach
  
  /target




 

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Property values as a property name ...

2008-06-05 Thread Parrish, Ken
Ah ha - that's the ticket.  Never noticed the function
property::get-value.

 

I'd prefer to design scripts that don't require this construct, but from
time to time, this facilitates a level of abstraction and reuse that can
reduce the size of my scripts a good deal.

 

Thanks,

 

Ken Parrish

Gomez, Inc.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roebuck,
Alex
Sent: Thursday, June 05, 2008 4:05 AM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Property values as a property name ...

 

Try this:

 

  property name=destination value=PROD/
  property name=PRODDirectories
value=//TPNDC1AS01/wwwroot,//TPNDC1AS02/wwwroot,//TPNDC1AS03/wwwroot/

  target name=directoryTest 

!--
  Construct the name of property to access
--
property name=destDirsName
value=${destination}Directories/  !-- I have corrected property name
--

!--
  Fetch the property represented by the value of the
name:
--   
property name=destDirs
value=${property::get-value(destDirsName)}/ 

foreach item=String property=deployDir in=${destDirs}
delim=, 
  echo message=deployDir = ${deployDir} /
/foreach
  
  /target

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Parrish,
Ken
Sent: Wednesday, June 04, 2008 7:44 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Property values as a property name ...

 

Is there any way in Nant to use the value of one property as the name of
another property?

 

Here is a sketch of what I want to do, but this will not parse/compile:

 

  property name=destination value=PROD/
  property name=PRODDirectories
value=//TPNDC1AS01/wwwroot,//TPNDC1AS02/wwwroot,//TPNDC1AS03/wwwroot/

  target name=directoryTest 

!--
  Construct the name of property to access
--
property name=destinationDirsName
value=${destination}Directories/

!--
  Fetch the property represented by the value of the
name:
--   
property name=destDirs value=${ ${destDirsName} }/
!-- Doesn't parse/compile. --

foreach item=String property=deployDir in=${destDirs}
delim=, 
  echo message=deployDir = ${deployDir} /
/foreach
  
  /target

 

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Directory difference tool ...

2008-07-31 Thread Parrish, Ken
I am building a configuration management system using Nant as the
scripting foundation.

 

I am looking for a tool which will compare two directories and generate
a list of files that have been added, deleted or modified.  For
directories which are under source code control, I can use the SCC
system (in this case Subversion) to generate a list of files and
directories that have been changed.  However, I am often in a situation
where I am working with a staging directory that is not under source
code control and need to compare it to another directory.

 

I have the MKS Korn shell installed on these servers, but the various
diff don't seem to have the option to generate JUST a list of changed
files.

 

Do any other Nant users have a suggestion for a tool to accomplish this
task?

 

Thanks,

 

Ken Parrish

Gomez, Inc.

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] svn failed to start

2008-08-11 Thread Parrish, Ken
Bob,

 

I don't know if this is the answer you are looking forward.  I tried may
time to get the svn Nant command to work reliably, but had never
ending problems with errors similar to yours, and mostly, conflicts
between the various Uri and path parameters.  Ultimately I gave up and
have recast all of my Subversion commands using the exec directive.  I
know that other users of Nant have had similar frustrations and done the
same with better success.

 

An example exec command for Subversion:

 

echo file=messagefile.txtIncremented version.xml to:
${newVersion}/echo



exec program=svn.exe verbose=true if=${svnDryRun == 'false'} 
  arg line=commit --file messagefile.txt --username ${svnUsername}
--password ${svnPassword} version.xml /
/exec



delete file=messagefile.txt /



Might be worth trying in your case.

 

Ken Parrish

Gomez, Inc.

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob
Archer
Sent: Friday, August 08, 2008 4:55 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] svn failed to start

 

Any ideas why this would happen?

 

[echo]
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progra~1\Subv
ersion
[exec] Starting 'svn ( cleanup)' in
'c:\Development\AmsiSuite\trunk\Third Party'
[exec]
c:\Development\AmsiSuite\trunk\Build\Packages\Subversion\SourceControl.T
arget.xml(60,10): 'svn' failed to start.
[exec] Starting 'svn ( revert --recursive .)' in
'c:\Development\AmsiSuite\trunk\Third Party'
[exec]
c:\Development\AmsiSuite\trunk\Build\Packages\Subversion\SourceControl.T
arget.xml(63,10): 'svn' failed to start.

 

The first echo shows the path using get-environment. Svn.exe is in the
path. If I set the path to the above in a command window and type svn it
runs.

 

BOb

 

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] svn failed to start

2008-08-11 Thread Parrish, Ken
Bob,


I ran into a similar problem when I installed the Subversion 1.5 client.
First, check your installation directory very closely.  I found that
different Subversion 1.5 installers and/or .zip files put the binary
files in different places (e.g. in ../bin or NOT).  I ended up with two
sets of binary files in different locations.  The various command shells
that I was using (cmd.exe and Korn shell) were looking in different
places for the binaries, so I'd get a different client using  the exec
command vs. executing directly from the command line.

 

If you use TortiseSVN  and upgrade to the latest version:  TortiseSVN
has IT'S OWN copy of Subversion 1.5, so Subversion commands that worked
in TortiseSVN behave differently from the command line version.

 

I'd suggest to check you installs first and see what that reveals.

 

Ken Parrish

 



From: Bob Archer [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2008 10:15 AM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] svn failed to start

 

I guess I should have been more specific here, I am using the exec tag:

 

exec program=svn workingdir=${SourceControl.GetOf}
verbose=${SVN.Debug}

arg line=cleanup /

/exec

exec program=svn workingdir=${SourceControl.GetOf}
verbose=${SVN.Debug}

arg line=update /

arg line=--non-interactive /

/exec

 

These are actually CI Factory scripts. The problem started occurring
after I upgraded to svn 1.5. Above this in the script it adds c:\Program
Files\subversion to the path which is echoed below in the log snippet I
included.

 

Thanks,

BOb

 

 



From: Parrish, Ken [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2008 9:36 AM
To: Bob Archer; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] svn failed to start

 

Bob,

 

I don't know if this is the answer you are looking forward.  I tried may
time to get the svn Nant command to work reliably, but had never
ending problems with errors similar to yours, and mostly, conflicts
between the various Uri and path parameters.  Ultimately I gave up and
have recast all of my Subversion commands using the exec directive.  I
know that other users of Nant have had similar frustrations and done the
same with better success.

 

An example exec command for Subversion:

 

echo file=messagefile.txtIncremented version.xml to:
${newVersion}/echo

exec program=svn.exe verbose=true if=${svnDryRun == 'false'} 
  arg line=commit --file messagefile.txt --username ${svnUsername}
--password ${svnPassword} version.xml /
/exec

delete file=messagefile.txt /

Might be worth trying in your case.

 

Ken Parrish

Gomez, Inc.

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob
Archer
Sent: Friday, August 08, 2008 4:55 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] svn failed to start

 

Any ideas why this would happen?

 

[echo]
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progra~1\Subv
ersion
[exec] Starting 'svn ( cleanup)' in
'c:\Development\AmsiSuite\trunk\Third Party'
[exec]
c:\Development\AmsiSuite\trunk\Build\Packages\Subversion\SourceControl.T
arget.xml(60,10): 'svn' failed to start.
[exec] Starting 'svn ( revert --recursive .)' in
'c:\Development\AmsiSuite\trunk\Third Party'
[exec]
c:\Development\AmsiSuite\trunk\Build\Packages\Subversion\SourceControl.T
arget.xml(63,10): 'svn' failed to start.

 

The first echo shows the path using get-environment. Svn.exe is in the
path. If I set the path to the above in a command window and type svn it
runs.

 

BOb

 

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Setting default logger ...

2008-08-13 Thread Parrish, Ken
I am using Nant with CruiseControl and get the error:  

 


Log does not contain any Xml output from NAnt.


Please make sure that NAnt is executed using the XmlLogger (use the
argument: -logger:NAnt.Core.XmlLogger). 

 

I tried setting the default logger in Nant.exe.config as such:

 

configuration



log4net threshold=OFF
logger name=NAnt.Core.XmlLogger
level value=DEBUG /
/logger
/log4net
/configuration



 

But that didn't work.  I don't have the option of specifying -logger on
the command line, so need to set the logger by default via
configuration.

 

Any ideas?

 

Ken Parrish

Gomez, Inc.

 

 

 

 

 

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] how to publish or output to a directory withmsbuildtask

2008-09-04 Thread Parrish, Ken
Have you created a Web Deployment Project for your web site?  The most
effective method for deploying web site project via Nant is to first
create a web deployment project, set the output path in that project
file.  Then after you have built your project, you can use all the other
Nant tasks to operate on that output.

 

We use this technique regularly for automated deployment of built and
integrated web sites for testing and production deployment.

 

Ken Parrish

Gomez, Inc.

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of spatemp
spatemp
Sent: Thursday, September 04, 2008 3:07 PM
To: Bob Archer
Cc: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] how to publish or output to a directory
withmsbuildtask

 

ok.  So, by default Output path is set to bin\ folder and the solution
is doing the build on say Release configuration.  By setting output
path to some folder other then say bin\, will it copy all .aspx etc..
for web application.  

 

Basically I am looking for what publishing a site does from MSBUILD.  I
want to then take all that content and zip it up so that I can do a
OnceClick deployment.

 

Also, what does web deployment project will give me and the benefits of
using it with Web Application type of projects(not web site).  

 

I can use xcopy but I want to avoid having to worry about excluding .cs
file and the others that I dont want on my web server.

 

On Thu, Sep 4, 2008 at 10:09 AM, Bob Archer [EMAIL PROTECTED] wrote:

I think the easiest way to do this is to set up a build configuration in
your solution that specifies where you want the output to go to. 

 

Other than that you can just use the copy task after the msbuild task to
move your files. 

 

You may also want to look at creating a web deployment project in your
solution which I think MSBuild will run.

 

As I said, several options here.

 

BOb

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of spatemp
spatemp
Sent: Thursday, September 04, 2008 7:43 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] how to publish or output to a directory with
msbuildtask

 

I need to modify my nant scripts to publish or output web application to
a directory.  So, currently we have following in the nant scrpit:

 

 

msbuild project=${Solution.Filename}  

 

property name=Configuration value=${Solution.BuildConfiguration} / 

 

property name=Platform value=Any CPU / 

/

msbuild 

 

What I would like to do is create an output directory under each project
and let MSBUILD task also publish or output it ot that directory.  Then
later on I can package that directory via zip and deploy it to various
servers.  It would be nice if it could have built in
${ProjectDir}\output or something like that.

Any help would be appricated.   Thanks.

by the way I tried following inside msbuild and it seems to publish
console projects etc.. but not Web Application type of project.  It
gives me some error about non publishable project or something.

 

arg value=/t:publish / 

 

 

 

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Directory different task or tool ...

2008-09-04 Thread Parrish, Ken
Does anyone know if there is a directory differencing task available for
Nant?  I have tried several external directory difference tools, but so
far, none have the level of control that a typical Nant command has such
as file and directory exclusions/inclusions.

 

I need such a tool to compute change lists and logs for deployment
runtime images.  Sometimes, I can generate such a list using the
facilities in my source code control tools.  However, there are some
occasions when that option is not available and I need a more general
purpose mechanism.

 

The output that I am hoping to generate would be a list of full file
paths with each file or directory marked with 'added', 'deleted',
'modified' or 'same'.  I tried a tool called CSDiff.exe, but it has no
facilities for specifying directories to exclude.  This is a huge
problem when navigating Subversion working directories with all of it's
.svn control directories.

 

Thanks,

 

Ken Parrish

Gomez, Inc.

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Build VS2008 with Nant, Solution task or MsBuild

2008-10-14 Thread Parrish, Ken
Arnaud,

 

My experience is that the msbuild task works well for MSBuild.  No
need to resort to exec.  Whether it runs the 2.0 or 3.5 version of
MSBuild depends on your global path settings.  I have found that the 3.5
version of MSBuild is fully backward compatible with the 2.0 version.

 

However, if you are using Subversion, I would recommend against using
the svn task.  Many people like myself have been quite frustrated with
this task implementation.  For Subversion, the exec task seems to work
much better.


Ken Parrish

Gomez, Inc.

 



From: arnaud gaudin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 14, 2008 6:44 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Build VS2008 with Nant, Solution task or MsBuild

 

Hi everybody,

 

I'm a newbye in Nant , CCNet, and Automation. I have read a book and a
couple article about the CI.

This week, I start to pratice it's going pretty well so far ;-)

 

So I have a NAnt script, and I want to build the VS2008 solution, using
the task Solution. But this task doesn't seem to be supported for
VS2008, Coud you confirm this to me, thanks?.

 

So I add an another look in the doc and in NantContrib I have found a
task Msbuild, I used this task and it works fine.

 

But I have 2 othes questions:

 

- Which of these two tasks are best to use MsBuild Task or run the Exec
task to call Msbuild.exe ? (The answer it's probably the task or maybe
another thing, I 'd love have your opinion)

- The build create the usual bin and obj folders in the solution folder,
so I'm wondering if the Msbuild task provide us the feature to change
the output, or else if we have to change the solution file for that with
Nant?

 

Thanks a million for your answer.

 

Arnaud

 

 

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] MSBuild task and .NET 3.5

2008-10-20 Thread Parrish, Ken
Does anyone know how to insure that the msbuild task targets the
version of MSBuild in the .NET Version 3.5 framework directory?  Is it
necessary to set the system path or is there a way to direct the
msbuild task to use a particular version of MSBuild?

 

Thanks,

 

Ken Parrish

Gomez, Inc.

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] MSBuild task and .NET 3.5

2008-10-21 Thread Parrish, Ken
Bob,

 

Thanks for the reference.

 

I am using Nant on two separate workstations.  I installed Nant Version
0.86 on both machines.  In both cases, I edited the Nant configuration
file and set:

 

   frameworks
platform name=win32 default=net-3.5

 

.
 

   /frameworks



On one workstation, all is well.  The msbuild task correctly
references the .NET 3.5 framework.

 

On our build server, I get the following error:

 

NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007)

Copyright (C) 2001-2007 Gerry Shaw

http://nant.sourceforge.net

 

 

BUILD FAILED

 

Microsoft .NET Framework 3.5 (net-3.5) is not installed, or not
correctly configured.

 

Object reference not set to an instance of an object.

 

For more information regarding the cause of the build failure, run the
build again in debug mode.

 

Try 'nant -help' for more information

 

 

I reinstalled / repaired the installation of .NET Framework 3.5 on this
server, but that did not solve this problem.  If I set the default
platform back to 'net-2.0', it works find (as long as I don't reference
VS 2008 solutions files).

 

Do you or anyone have any thoughts or suggestions as to why I am getting
the error above?  Are there any additional OS or .NET components that
need to be installed to support Nant with the .NET version 3.5
framework?

 

Thanks,

 

Ken Parrish

Gomez, Inc.

 

From: Bob Archer [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2008 5:35 PM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] MSBuild task and .NET 3.5

 

You specify the framework targeting property when you start nant. Here
is the faq on it. 

 

http://nant.sourceforge.net/faq.html#framework-support

 

Bob

 

 



From: Parrish, Ken [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 20, 2008 5:06 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] MSBuild task and .NET 3.5

 

Does anyone know how to insure that the msbuild task targets the
version of MSBuild in the .NET Version 3.5 framework directory?  Is it
necessary to set the system path or is there a way to direct the
msbuild task to use a particular version of MSBuild?

 

Thanks,

 

Ken Parrish

Gomez, Inc.

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] MSBuild task and .NET 3.5

2008-10-21 Thread Parrish, Ken
Where or how does Nant get the value, used in Nant.exe.config, for
'sdkInstallRoot' and 'installroot' ?

Do these map to environment variables?  Are they required?

Thanks,

Ken Parrish

-Original Message-
From: Brass Tilde [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2008 2:30 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] MSBuild task and .NET 3.5

 I am using Nant on two separate workstations.  I installed Nant
Version 0.86
 on both machines.  In both cases, I edited the Nant configuration file
and
 set:

Did you compare the two config files to make absolutely certain that
they are the same?

If so, it sounds like either something that should be in the path
isn't, or that something didn't get installed properly.

Brad


-
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=100url=/
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

-
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=100url=/
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] MSBuild task and .NET 3.5

2008-10-21 Thread Parrish, Ken
Julian,

 

Thanks.  This was very insightful.

 

However, I have a conflict that I don't know how to resolve.

 

On the machine for which Nant Version 0.86 works with 'net-3.5'
framework specified, I have Windows SDK Version 6.0a installed.

 

On the machine for which Nant Version 0.86 does not work with 'net-3.5'
framework specified, I have Windows SDK Version 6.1 installed.
Supposedly this is the version of the framework for .NET 3.5.

 

I checked the registry key:

 

SOFTWARE\Microsoft\Microsoft
SDKs\v6.0A\WinSDKNetFxTools\InstallationFolder

 

This is present on both machines and references the 6.0A or 6.1 version
of the SDK respectively.

 

It seems counter intuitive that I should need to revert BACK to SDK
Version 6.0A from Version 6.1 in order for Nant 0.86 to operate
properly.

 

Is there some reason or explanation why Nant 0.86 might NOT be
compatible with SDK Version 6.1?  I would think that this problem
manifests itself 'the other way 'round'.

 

Any other ideas or clues would be greatly appreciated.

 

Ken Parrish

Gomez, Inc.

 

 

 

From: Julian Simpson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2008 4:20 PM
To: Parrish, Ken
Subject: Re: [NAnt-users] MSBuild task and .NET 3.5

 

Having just spent this evening wrestling with the same issue, I can tell
you that they come from the registry.  Have a look at this post:

 

http://www.timbarcz.com/blog/CategoryView,category,Nant.aspx

 

They don't map to environment variables and the application uses them
extensively.

 

Jumping in late here but I presume that you'll want to install at least
the .NET 3.5 SDK to make your build work.  I just ended up installing a
Visual Studio 2008 and the SDK to support the project I've been working
on.

 

 Best

 

Julian

 

 

 

 

On 21 Oct 2008, at 20:17, Parrish, Ken wrote:





Where or how does Nant get the value, used in Nant.exe.config, for

'sdkInstallRoot' and 'installroot' ?

 

Do these map to environment variables?  Are they required?

 

-- 

Julian Simpson

Software Build and Deployment

http://www.build-doctor.com

 

 

 

-
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=100url=/___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] MSBuild task and .NET 3.5

2008-10-22 Thread Parrish, Ken
Bob,

 

I seem to recall that as long as I executed the correct version of
MSBuild from the command line (.NET 2.0 vs .NET 3.5), MSBuild 'did the
right thing'.   I can be certain that it worked in all cases as I was
struggling with several issues simultaneously-in addition to moving to
VS 2008 solutions and projects, I was also trying to get some newly
minted C++ projects to build as well.

 

As I go along, I will try to 'prove out' my theory about Nant and it's
behavior with SDK Version 6.1 vs. 6.0A.  There are some additional
workstations here that haven't been fully upgraded to VS 2008 as yet and
I can use them as 'guinea pigs'.

 

I have yet as well to scan the registry to see what keys have changed
that might affect Nant's interaction with the SDKs.  TBD.  I'll keep you
posted.

 

Thanks to all for your help.

 

Ken Parrish

Gomez, Inc.

 

 

 

From: Bob Archer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 22, 2008 4:48 PM
To: Parrish, Ken; Gert Driesen; Julian Simpson;
nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] MSBuild task and .NET 3.5

 

Sounds like a bug in Nant to me. I think I asked but you never
answered... can you build the project using MSBuild on the command line
of the machine you are having problems with? If so, it is not the SDK
issue but a Nant one. 

 

The only IDE I have on my build server is VS6 to compile VB stuff
with... ug. 

 

All my .Net 2.0 builds run fine just having .Net and .Net SDK's
installed.

 

BOb

 

 



From: Parrish, Ken [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 22, 2008 3:48 PM
To: Gert Driesen; Julian Simpson; nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] MSBuild task and .NET 3.5

 

Sorry folks for my slow response.  Wearing many hat and fighting fires,
as I am sure you can all relate to.

 

When I posted my original question, I had installed the Windows SDK for
Server 2008 and .NET Framework 3.5.  I believe this installed SDK
Version 6.1.  However, Nant 0.86 did not, would not work with .NET 3.5
with this version of the SDK.  I tried cheating and hacking the
registry, but still no luck.

 

I then installed Visual Studio 2008 and in so doing, installed SDK
Version 6.0A.  Once I did this, Nant 0.86 began to work with .NET 3.5.
I adjusted the framework tag as follows:

 

frameworks


platform name=win32 default=net-3.5

. . .

/frameworks

Then things began to work-finally.

 

So, it appears that Nant Version 0.86 requires Version 6.0A of the SDK
and that Version 6.1, even though it is 'supposedly' newer and supports
.NET Framework 3.5, doesn't work.

 

What I don't know and can't say for sure, is whether Nant Version 0.86
SHOULD be able to work with SDK Version 6.1.  I just don't know enough
about the differences between SDK to say for sure.  As far as I can
tell, when I ONLY had Version 6.1 of the SDK, the registry entries
pointed to the right directories.

 

I would prefer not to have to install Visual Studio 2008 on a target
build machine just to get support for Nant Version 0.86 and the
msbuild task.  I'd rather just install the appropriate SDK.  However,
I cannot seem to find a separate installation of SDK Version 6.0A on
Microsoft's web site.

 

 

At this point, all my build scripts are functioning normally and I have
full support for mixed builds of 2005 and 2008 solutions files.  That's
good.  But, having had to install so many SDK on our build server, I
have quickly running out of disk space.  Having 3 SDKs and 2 IDEs on a
build server should not be necessary-kind of a heavy-handed approach to
this problem.

 

Any additional thoughts or insights would be appreciated.

 

Ken Parrish

Gomez, Inc.

 

 

From: Gert Driesen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 22, 2008 4:03 AM
To: Parrish, Ken; Julian Simpson; nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] MSBuild task and .NET 3.5

 

Ken,

 

Are you sure that the mentioned registry key exists on both machines?

 

I haven't checked this yet, but other users posted messages claiming
that this registry key is not created when you installed v6.1 of the
Windows SDK.

 

Also, can you try using the most recent nightly build of NAnt as that
fixes a few framework-related issues.

 

More details on the fixes are available here:

http://nant.sourceforge.net/nightly/latest/releasenotes.html

 

Gert

 

From: Parrish, Ken mailto:[EMAIL PROTECTED]  

Sent: Tuesday, October 21, 2008 11:10 PM

To: Julian Simpson mailto:[EMAIL PROTECTED]  ;
nant-users@lists.sourceforge.net 

Subject: Re: [NAnt-users] MSBuild task and .NET 3.5

 

Julian,

 

Thanks.  This was very insightful.

 

However, I have a conflict that I don't know how to resolve.

 

On the machine for which Nant Version 0.86 works with 'net-3.5'
framework specified, I have Windows SDK Version 6.0a installed.

 

On the machine for which Nant Version 0.86 does not work with 'net-3.5'
framework specified, I have Windows SDK Version 6.1

Re: [NAnt-users] Beginner Questions

2008-12-09 Thread Parrish, Ken
LLCard:

Bob's recommendation to get the Nant book is excellent advice.

Some thoughts on a few issues that you mention:

I have created at Gomez an extensive build and configuration management
system using CruiseControl.NET and Nant.  This system makes widespread
use of reusable Nant files and tasks.  In addition, there are Nant
include files which contain local, global and machine specific property
settings so that the system can be deployed on other host machines with
a clear and unambiguous means to set the environment for that host.

We now have Nant targets for build, clean, rebuild, etc., and as well
for all manner of version tagging, automated deployment, Subversion
updating, version differencing, etc., etc.

After over a year of development, I found that putting all of my
'master' Nant scripts in a single directory OUTSIDE of my normal source
working directory works very well.

Then, within the source working directory, I place a single Nant .build
script in each directory within the hierarchy.  These scripts are
derived from one of several 'template' scripts that I've created for
different node / project types:

.NET web/webservice application
.NET windows service
.NET windows console
.NET windows forms application
C++ application
trunk directory
parent directory

The systems is designed so that I can go to any point in the directory
hierarchy and execute a Nant task.  If appropriate, the Nant script will
recurse into the various sub-directories and apply the task to each
subsequent build script.

As such, my master build script becomes the build script in the top-most
directory of my source working directory.  I've tried many ways of
managing large build systems and, so far, this is most effective.

Hope this helps and gives you a place to start.

Ken Parrish
Gomez, Inc.

-Original Message-
From: LLCard [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2008 4:38 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Beginner Questions


Hi Folks,

I am just beginning to start using NAnt and CruiseControl.Net that I
have
set up on my home machine with an SVN repository using Apache.  I have a
couple easy builds already working and can see them in CCTray.  I have
added
2 projects to the ccnet.config file that point to 2 different build
files in
a build root folder.  My thoughts were to keep all build files at this
build
root level.  This is kool stuff.

What I am hoping to do is find some examples of how others have made
their
build scripts resuable.  I cant seem to find examples out there so I am
hoping there are some folks on here that would be willing to share their
ccnet.config files and build files so I can look and use as examples or
point me to a place where I can find this kind of information.


Thanks



-- 
View this message in context:
http://www.nabble.com/Beginner-Questions-tp20882623p20882623.html
Sent from the NAnt - Users mailing list archive at Nabble.com.



--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
Nevada.
The future of the web can't happen without you.  Join us at MIX09 to
help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.
com/
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Delete files but preserve directory tree

2009-01-06 Thread Parrish, Ken
I am trying to write a Nant task which, given the pathname of a
directory, will recursively remove all the files at all levels in the
directory tree, but will NOT delete any of the directories themselves.
 
This is needed so that we can 'purge' a deployment web site, but
preserve the directory tree and configuration files, thus preserving
various file system and web server permissions and attributes assigned
to various nodes in the directory tree.
 
I was hoping to do this with a single delete task, but have been
unsuccessful in my attempts to create a fileset element which behaves
properly.  I tried using include name=** / but that causes all the
subdirectory nodes to be deleted as well.  For example:
 
 
delete
  fileset basedir=${PurgeDeploymentDirectory_dir}
include name=** /
  /fileset
/delete


Does anyone have any ideas how to approach this problem?  Should I write
this as a task that recursive walks the directory tree?
 
Thanks,
 
Ken Parrish
Gomez, Inc.
 
--
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] External reference to a fileset

2009-01-06 Thread Parrish, Ken
I am attempting to use the feature of a fileset which allows for an
external reference to a pre-defined fileset.  This would be most useful
in my application in cases where a  complicated include/exclude filter
needs to be applied to several file and directory operations.
 
However, the behavior of the 'basedir' attribute is not what I would
expect:
 
 
  fileset id=webSiteFileSet
include name=*.* /
exclude name=*.config /
exclude name=database*.xml /
  /fileset



  target name=PurgeSite 

  echo message= PurgeSite = ${PurgeSite_dir} /

delete
  fileset refid=webSiteFileSet
basedir=${PurgeSite_dir} /
/delete
  /target


In this case, I would expect the 'basedir' attribute that I supplied in
the delete task to take effect.  However, only if the 'basedir'
attribute is specified in the fileset definition, will it be properly
applied by the delete task.
 
Is this by design?  Is this a bug or oversight?  Is there a mechanism
for causing the delete task to behave as I am attempting to use it in
the above case?
 
Thanks,
 
Ken Parrish
Gomez, Inc.
--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] External reference to a fileset

2009-01-06 Thread Parrish, Ken
Gert,
 
Yes, the patternset works exactly as desired.  I can define a
patternset (in this case with a dozen entries) and reuse it throughout
my set of scripts.
 
Thanks.
 
Ken
 
From: Gert Driesen [mailto:gert.drie...@telenet.be] 
Sent: Tuesday, January 06, 2009 4:18 PM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] External reference to a fileset
 
Ken,
 
You should actually be using a patternset in combination with a
fileset:
http://nant.sourceforge.net/release/latest/help/types/patternset.html
 
Hope this helps,
 
Gert
 
From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: dinsdag 6 januari 2009 21:20
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] External reference to a fileset
 
I am attempting to use the feature of a fileset which allows for an
external reference to a pre-defined fileset.  This would be most useful
in my application in cases where a  complicated include/exclude filter
needs to be applied to several file and directory operations.
 
However, the behavior of the 'basedir' attribute is not what I would
expect:
 
 
  fileset id=webSiteFileSet
include name=*.* /
exclude name=*.config /
exclude name=database*.xml /
  /fileset


  target name=PurgeSite 

  echo message= PurgeSite = ${PurgeSite_dir} /

delete
  fileset refid=webSiteFileSet
basedir=${PurgeSite_dir} /
/delete
  /target
In this case, I would expect the 'basedir' attribute that I supplied in
the delete task to take effect.  However, only if the 'basedir'
attribute is specified in the fileset definition, will it be properly
applied by the delete task.
 
Is this by design?  Is this a bug or oversight?  Is there a mechanism
for causing the delete task to behave as I am attempting to use it in
the above case?
 
Thanks,
 
Ken Parrish
Gomez, Inc.
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.10.2/1873 - Release Date:
1/5/2009 7:20 PM
--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Delete files but preserve directory tree

2009-01-06 Thread Parrish, Ken
Bob,

Yes, '*' matches all files, but will also match all directory names and
the net result is to delete the entire directory tree.

What I want to do is to recursively delete all the files in a directory
tree WITHOUT deleting any of the directories themselves.  In addition,
it would be extremely helpful to be able to apply fileset or
patternset filtering to the deletion of files.

In effect, delete that operates recursively ONLY on files, NOT on
directory nodes.

Ken

-Original Message-
From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Tuesday, January 06, 2009 4:35 PM
To: Parrish, Ken; Brass Tilde; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Delete files but preserve directory tree

Rather than using *.* use * ... that will match any filename with or
without an extension.

I guess I don't understand why you can just exclude your config file
names. If they are in a directory the directory won't be deleted.

BOb



 -Original Message-
 From: Parrish, Ken [mailto:kparr...@gomez.com]
 Sent: Tuesday, January 06, 2009 2:35 PM
 To: Brass Tilde; nant-users@lists.sourceforge.net
 Subject: Re: [NAnt-users] Delete files but preserve directory tree
 
 Nant Users,
 
 Thanks for your feedback on this.  I've replied to this list a couple
of
 time, but my posting keep getting bounced.
 
 The addition of a filesOnly and/or directoriesOnly attribute to a
 fileset would greatly simplify file operations which need to be
 applied to one or the other, yet still allow for the power and
 flexibility of the fileset element.
 
 Below it what I devised.  It works well except that the *.* file
filter
 excludes files that might not have an extension.  Not a huge problem
in
 the Windows world that I employ, but still a limitation.
 
 However, the filesOnly parameter to the fileset as described above
 would likely allow this task to reduce to a single delete element.
 
 Thanks,
 
 Ken Parrish
 Gomez, Inc.
 
   !--
   PurgeDirectory
   Recursively removes file from a directory tree
 preserving the directory tree.
 
   Parameters:
   PurgeDirectory_dir  path
 name of directory to purge
   --
   target name=PurgeDirectory 
 
   echo message=PurgeDirectory = ${PurgeDirectory_dir} /
 
   delete
   fileset basedir=${PurgeDirectory_dir}
   include name=*.* /
 
   !-- Add exclusions here --
   /fileset
   /delete
 
   foreach item=Folder in=${PurgeDirectory_dir}
 property=dirname
   property name=PurgeDirectory_dir
 value=${dirname} /
   call target=PurgeDirectory /
   /foreach
   /target
 
 
 
 
 -Original Message-
 From: Brass Tilde [mailto:brassti...@gmail.com]
 Sent: Tuesday, January 06, 2009 11:24 AM
 To: nant-users@lists.sourceforge.net
 Subject: Re: [NAnt-users] Delete files but preserve directory tree
 
  IF this a consistent directory tree? If so, just exclude the
 directories
  from the delete. If not I think you should be able to use a foreach
to
 loop
  over a fileset and delete each individual files. But, I don't know
how
 good
  the performance on this will be.
 
 Would the effort of adding a filesOnly attribute to the fileset
 object be worth the time and effort?
 
 Brad
 


 --
 Check out the new SourceForge.net Marketplace.
 It is the best place to buy or sell services for
 just about anything Open Source.
 http://p.sf.net/sfu/Xq1LFB
 ___
 NAnt-users mailing list
 NAnt-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/nant-users
 


--
 
 Check out the new SourceForge.net Marketplace.
 It is the best place to buy or sell services for
 just about anything Open Source.
 http://p.sf.net/sfu/Xq1LFB
 ___
 NAnt-users mailing list
 NAnt-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/nant-users

--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Navigating XML documents ...

2009-01-27 Thread Parrish, Ken
Sometime back there were several postings regarding the problem of
navigating through a collection of XML nodes in an XML document.
 
I have a Nant task that needs to fetch a collection of XML nodes from a
file and iterate over the collection and take action against each node.
An example of the content of the XML file is shown below.
 
In this case, I need to fetch the FileItems node and iterate over this
child nodes.  I am aware that the xmlpeek task has a node number that
can be use to fetch the nth node in a list.  However, my files
potentially have 100's of nodes to this technique seems pretty
cumbersome.
 
I recall seeing a reference to an xmllist task, but my link to this
task is broken.
 
Are there any reasonable solutions to this problem?  Any Nant libraries
for parsing and navigating XML files?
 
?xml version=1.0?
MyFileList
  summary
  /summary
  FileItems
FileItem Path=file01.txt /
FileItem Path=file02.txt /
FileItem Path=file03.txt /
FileItem Path=file04.txt /
FileItem Path=file05.txt /
  /FileItems
/MyFileList


Thank you,
 
Ken Parrish
Gomez, Inc.
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Navigating XML documents ...

2009-01-30 Thread Parrish, Ken
Mike,

Thanks so much for your feedback.  I used your suggestion with a little
wrinkle.  Instead of creating unique names for each node in the Xml
file, I gave each node an attribute with a unique ID.  That way, the
file can still be parsed by other Xml parsers without confusion.  This
is what I came up with:

Sample XML file:

?xml version=1.0?
DirDiff
  FileDirItems
FileDirItem Id=1 Type=File Status=Modified
Path=DNSLookup.asp /
FileDirItem Id=2 Type=File Status=Modified
Path=encryption.asp /
FileDirItem Id=3 Type=File Status=Modified Path=err404.asp
/
FileDirItem Id=4 Type=File Status=Modified Path=error.asp
/
FileDirItem Id=5 Type=File Status=Modified Path=error.aspx
/
FileDirItem Id=6 Type=File Status=Modified
Path=errorauth.aspx /
FileDirItem Id=7 Type=File Status=Added Path=genericPub.asp
/
FileDirItem Id=8 Type=File Status=Added
Path=getchart_id.asp /
FileDirItem Id=9 Type=File Status=Added
Path=glossary_windoid.asp /
  /FileDirItems
/DirDiff

Nant task code:

target name=default 
property name=fileName value=ChangeList.xml /
xmllist file=${fileName}
xpath=/DirDiff/FileDirItems/FileDirItem/@Id property=idList /

foreach item=String delim=, in=${idList}
property=itemId 

xmllist file=${fileName}
xpath=/DirDiff/FileDirItems/FileDirItem [...@id='${itemId}']/@Path
property=filePath /
xmllist file=${fileName}
xpath=/DirDiff/FileDirItems/FileDirItem [...@id='${itemId}']/@Status
property=fileStatus /

echo message=itemId = ${itemId}, filePath =
${filePath}, fileStatus = ${fileStatus} /

!-- Now, do the work  --
/foreach
/target


Much appreciated.

Ken Parrish
Gomez, Inc.


_


-Original Message-
From: Mike Frederick [mailto:mikeyf...@att.net] 
Sent: Thursday, January 29, 2009 12:33 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Navigating XML documents ...

It is a little painful, but it is possible.  The idea is to be able to 
address each FileItem node individually.  If each Path property is 
unique across all of the FileItem nodes, then you can use that property 
to pick-out each FileItem node:

project name=Ken default=go
property name=XMLFile value=Ken.xml/
property name=xpath value=/MyFileList/FileItems/FileItem/
target name=go
xmllist file=${XMLFile} xpath=${xpath}/@Path 
property=pathlist/
foreach item=String delim=, in=${pathlist}
property=path
echoFile: ${path}/echo
xmllist file=${XMLFile} xpath=${xpath} 
[...@path='${path}']/@Status property=status/
xmllist file=${XMLFile} xpath=${xpath} 
[...@path='${path}']/@Mode property=mode/
echo  status: ${status}, mode: ${mode}/echo
echo /
/foreach
/target
/project

Since you have gotten this far, I will mention that I tend to address 
this situation by creating nodename that are unique, such as:

?xml version=1.0?
MyFileList
summary
/summary
FileItems
File01 Path=file01.txt Status=good Mode=ok /
File02 Path=file02.txt Status=bad Mode= ok /
File03 Path=file03.txt Status=good Mode=notok/
File04 Path=file04.txt Status=ignore Mode=ok /
File05 Path=file05.txt Status=bad Mode=ok /
/FileItems
/MyFileList

which is ugly from a schema perspective, but I have a mod to xmllist 
that allows me to do:

project name=Ken default=go
property name=XMLFile value=Ken.xml/
property name=xpath value=/MyFileList/FileItems/
target name=go
xmllist file=${XMLFile} xpath=${xpath}/*
property=filelist/
foreach item=String delim=, in=${filelist} 
property=fileitem
xmllist file=${XMLFile} 
xpath=${xpath}/${fileitem}/@Path property=path/
xmllist file=${XMLFile} 
xpath=${xpath}/${fileitem}/@Status property=status/
xmllist file=${XMLFile} 
xpath=${xpath}/${fileitem}/@Mode property=mode/
echoFile: ${path}/echo
echo  status: ${status}, mode: ${mode}/echo
echo /
/foreach
/target
/project

which I like a lot better from a programming perspective.  The mod I 
made was to allow a file nodename to be a *, which is interpreted as 
return a list of all child nodenames.

The idea is to
 Thanks for the reference to xmllist.  I have built this code into my
 standard extension DLL and it seems to be working as advertised.

 However, there is a part of the problem that I have yet to find a good
 solution.  In the example below, I can generate a list of all the
'Path'
 attributes, or all the 'Status' attributes.  However, there is no
 practical way (that I can think of) to iterate over these two lists
 simultaneously.  

 What I really need is to 'fetch' each FileItem node, one at a time,
 then gather the various attributes set for that node.  Then, iterate
to
 the next FileItem node in the 

[NAnt-users] Setting version numbers in .RC files ...

2009-02-26 Thread Parrish, Ken
I'm looking for a task or code snippet for setting the version numbers
in C++ project .RC files which get compiled into .EXE and .DLL.

It's been while, but I seem to recall a discussion about this some
months ago.

Has anyone tackled this problem as yet?

Ken Parrish
Gomez, Inc.

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Setting version numbers in .RC files ...

2009-03-05 Thread Parrish, Ken
Gert,

Thanks for your reply.  I'm finally getting to work on this.

I have worked up a solution using a 'template' .RC file which has tokens
in the form of @TOKEN_NAME@ which I replace with an appropriately
formatted version number and then copy to the proper .RC file name.  In
this case, I am using the replacetokens filter chain directive.  This
works and is reliable.

It would be better to modify .RC files in place.  However, because of
variations in the value of existing version numbers, I would need to use
some sort of regular expression evaluation and substitution to change
them.

For example, if my source file had a line like:

VALUE BuildRev, 10.0.0:5

I would want to replace the characters '10.0.0:5' with a new value.
Something like:

Replace: {VALUE \BuildRev\,.*\}{.*}{\}
With: \112.3.4.5\2

Any chance there is a way to use regular expressions in combination with
filter chains as part of the replacestring directive?

Thanks,

Ken Parrish
Gomez, Inc.

-Original Message-
From: Gert Driesen [mailto:gert.drie...@telenet.be] 
Sent: Friday, February 27, 2009 8:22 AM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Setting version numbers in .RC files ...

Hi Ken,

You can use filterchains for this:
http://nant.sourceforge.net/release/latest/help/types/filterchain.html

Hope this helps,

Gert

-Original Message-
From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: donderdag 26 februari 2009 22:28
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Setting version numbers in .RC files ...

I'm looking for a task or code snippet for setting the version numbers
in C++ project .RC files which get compiled into .EXE and .DLL.

It's been while, but I seem to recall a discussion about this some
months ago.

Has anyone tackled this problem as yet?

Ken Parrish
Gomez, Inc.



--
Open Source Business Conference (OSBC), March 24-25, 2009, San
Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the
Enterprise
-Strategies to boost innovation and cut costs with open source
participation
-Receive a $600 discount off the registration fee with the source code:
SFAD
http://p.sf.net/sfu/XcvMzF8H
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Internal Virus Database is out of date.
Checked by AVG - http://www.avg.com 
Version: 8.0.176 / Virus Database: 270.11.2/1965 - Release Date:
2/21/2009
3:36 PM


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] XML Validator

2009-04-20 Thread Parrish, Ken
Brass,

One option that you might pursue is creating a simple Console application 
wrapper around the XmlReader class in the .NET class library.  This object is 
capable of validating an XML document or fragment against one or more schema 
URLs.  The documentation for this class contains several examples which could 
easily be adapted to your needs.  There are also examples in the File and 
Directory classes for recursing through a directory tree.

Granted, it's a bit more work, but with a few hours of programming, you could 
create a custom application that will recurse through a directory tree and 
perform the validation according to your specifications.

I'd also recommend looking at the Plossom command line toolkit--it makes quick 
work of adding command line options to utility console applications.

I've created a number of command line utilities to tackle similar tasks to what 
you describe.  Depending on the application, I've often found that it takes 
less time to write a custom utility using Plossum and the .NET class library 
than it does to fight with poorly designed or documented shareware.  You then 
have the option of customizing and optimizing to your specific needs.

If you're interested, let me know--I have some C# code snippets that might be 
useful.

One other option to consider is the Microsoft utility XmlDiffPatch.  I'm not 
sure if you can bend to do validation only, but it's powerful tool.

Ken Parrish
Gomez, Inc.

-Original Message-
From: Brass Tilde [mailto:brassti...@gmail.com] 
Sent: Monday, April 20, 2009 8:55 AM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] XML Validator

Depending on exactly what you mean by validate a folder of xml
files, Saxon may fill the bill.

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] XML Validator

2009-04-21 Thread Parrish, Ken
Got it.  Forwarded my original reply to Alon.  KP

-Original Message-
From: Brass Tilde [mailto:brassti...@gmail.com] 
Sent: Monday, April 20, 2009 10:59 AM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] XML Validator

 Brass,

 One option that you might pursue

Just to clarify, this is Alon Amsalem's question, not mine.

/bs

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Delete not removing directories ...

2009-04-22 Thread Parrish, Ken
I am trying to create a simple task that will purge 'garbage' out of a 
directory tree as specified in a fileset element as follows:

 . . .
  property name= PurgeDeployDirectory_dir 
value=c:/Gomez/TestPurge/wwwroot//

  call target= PurgeDeployDirectory/

 . . .

  target name=PurgeDeployDirectory 

  echo message=PurgeDeployDirectory_dir = 
${PurgeDeployDirectory_dir} /

delete verbose=true includeemptydirs=true 
  fileset basedir=${PurgeDeployDirectory_dir} 
defaultexcludes=false 
include name=**/_vti_cnf /
include name=**/XX* /
include name=Dashboard /
  /fileset
/delete
  /target




In this case, files named 'XX*' ARE deleted.  However, directories name 
'_vti_cnf' or 'Dashboard' ARE NOT deleted.

Any clue as to why the directories are not removed?

Ken Parrish
Gomez, Inc.



--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Delete not removing directories ...

2009-04-22 Thread Parrish, Ken
Bob, Brass, et. al.,

No luck so far.  I tried all permutations that both you and Bob suggested, plus 
a variety of others.  Bottom line is that I can't get delete to work on a 
filesetinclude item that represents a directory--no way, no how.  I'm 
really baffled as to why this doesn't work.  Might be time to dig into the 
source code or write a custom task.

Unfortunately, using exclude instead of include is not an option as there 
are over 7000 files in these directories--no way to clearly indicated what 
should be included.

I'm trying to automate a process for surgically cleaning out our deployment 
directories based on an explicit list of files and sub-directories.

Any other clues or ideas would be greatly appreciated.

include name=**/Dashboard/** /

Works, but leaves all directories.

include name=Dashboard/** /

Does not work at all.

KP

-Original Message-
From: Brass Tilde [mailto:brassti...@gmail.com] 
Sent: Wednesday, April 22, 2009 3:00 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Delete not removing directories ...

     delete verbose=true includeemptydirs=true 
   fileset basedir=${PurgeDeployDirectory_dir} 
 defaultexcludes=false 
     include name=**/_vti_cnf /
     include name=**/XX* /
     include name=Dashboard /
   /fileset
     /delete

   /target

What happens if you use **/_vti_cnf/ or **/_vti_cnf/** and
Dashboard/ or Dashboard/** instead?

/bs
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] SOLVED: RE: Delete not removing directories ...

2009-04-22 Thread Parrish, Ken
Scoured the documentation and discovered that delete will not act on ReadOnly 
files and directories.  Marked the entire directory tree as Read/Write.  Now 
everything is working as expected.

Next up, an investigation into the attrib task.

Ken



-Original Message-
From: Brass Tilde [mailto:brassti...@gmail.com] 
Sent: Wednesday, April 22, 2009 3:00 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Delete not removing directories ...

     delete verbose=true includeemptydirs=true 
   fileset basedir=${PurgeDeployDirectory_dir} 
 defaultexcludes=false 
     include name=**/_vti_cnf /
     include name=**/XX* /
     include name=Dashboard /
   /fileset
     /delete

   /target

What happens if you use **/_vti_cnf/ or **/_vti_cnf/** and
Dashboard/ or Dashboard/** instead?

/bs
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Delete not removing directories ...

2009-04-22 Thread Parrish, Ken
One more wrinkle to this problem that might be of interest.  In order for the 
attrib task to enable removal of a directory, it is necessary to append '/**' 
to any directory designation so as to include all the files in directory.  
Otherwise, the delete task will ignore the directory unless it's entire 
contents is also marked R/W.

This necessitates declaring directories to be removed in a fileset or 
patternset directive with a trailing '/**'.  Not necessary if the directory 
is ALREADY marked R/W - the delete command will work correctly.  BUT, if you 
must first invoke the attrib, then it is necessary to append '/**' to insure 
all enclosed files are also marked.

The resulting code is below:  First patternset entry delete a 'specified' 
directory.  Second patternset entry deletes all directories of a given name.  
Third patternset entry deletes all files matching a wild card specification 
anywhere in the directory tree.

Hope this is useful info.

Ken Parrish
Gomez, Inc.


patternset id=deploySiteCleanupSet 
include name=Dashboard/** /
include name=**/_vti_cnf/** /
include name=**/XX* /
include name=Dashboard2 /
/patternset

target name=PurgeDeployDirectory 

echo message=PurgeDeployDirectory_dir = 
${PurgeDeployDirectory_dir} /

attrib verbose=true readonly=false 
fileset basedir=${PurgeDeployDirectory_dir} 
defaultexcludes=false 
patternset refid=deploySiteCleanupSet /
/fileset
/attrib

delete verbose=true includeemptydirs=true 
fileset basedir=${PurgeDeployDirectory_dir} 
defaultexcludes=false 
patternset refid=deploySiteCleanupSet /
/fileset
/delete

/target




-Original Message-
From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: Wednesday, April 22, 2009 3:45 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] SOLVED: RE: Delete not removing directories ...

Scoured the documentation and discovered that delete will not act on ReadOnly 
files and directories.  Marked the entire directory tree as Read/Write.  Now 
everything is working as expected.

Next up, an investigation into the attrib task.

Ken



-Original Message-
From: Brass Tilde [mailto:brassti...@gmail.com] 
Sent: Wednesday, April 22, 2009 3:00 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] Delete not removing directories ...

     delete verbose=true includeemptydirs=true 
   fileset basedir=${PurgeDeployDirectory_dir} 
 defaultexcludes=false 
     include name=**/_vti_cnf /
     include name=**/XX* /
     include name=Dashboard /
   /fileset
     /delete

   /target

What happens if you use **/_vti_cnf/ or **/_vti_cnf/** and
Dashboard/ or Dashboard/** instead?

/bs
--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Filesets - include / exclude

2009-04-23 Thread Parrish, Ken
Question about how fileset and patternset are interpreted.

How does Nant reconcile potentially conflicting include and exclude tags.

During a copy operation, I would like to exclude all text (.txt) files except 
those explicitly listed.  How might I do this?  Let's say, I want to exclude 
all *.txt files EXCEPT a particular text file.  Is this the right syntax?

How will the following example be interpreted by Nant?

fileset basedir=${sourceBinDir}
  include name=messagefile.txt /
  exclude name=*.txt /
/fileset


What if the order of include and exclude are interchanged?  The 
documentation doesn't make this very clear.

Anyone have any experience with this or similar situations?

Thanks,

Ken Parrish
Gomez, Inc.




--
Crystal Reports #45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] FW: Filesets - include / exclude

2009-04-24 Thread Parrish, Ken
Interesting idea.  Multiple patternset elements can be referenced in a 
fileset, however, all the referenced include and exclude directives 
behave as though it were a single fileset.  The following has the same effect 
as if all three include and exclude directives were specified in the same 
fileset:


patternset id=patternSet1
include name=** /
exclude name=*.txt /
/patternset

patternset id=patternSet2
include name=File1.txt /
/patternset

target name=PatternSetTest

copy todir=${dstDir} verbose=true 
fileset basedir=${srcDir}
patternset refid=patternSet1 /
patternset refid=patternSet2 /
/fileset
/copy

/target


From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Friday, April 24, 2009 10:03 AM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Filesets - include / exclude

Thanks for the info Ken. That is how I do it too. I just use multiple copy 
tasks. It always seemed to me that they copy task should support multiple 
fileset sections but it doesn't. Have you perhaps tried using multiple 
paternsets? Sort of like:

paternset refid=allfileswotext
   include name=** /
   exclude name=*.txt /
/paternset

--
Crystal Reports #45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Embedded XML in Nant scripts ...

2009-06-24 Thread Parrish, Ken
I have a need to embed 'extra' information in a Nant script.  We've developed a 
configuration management database and have various crawlers and update engines, 
one of which parses existing Nant scripts collecting configuration management 
data embedded as properties in our build scripts.

There are occasions when it would be useful to insert additional information in 
a build script beyond using just properties.  In particular, snippets of 
structured XML.  I'm using the .NET XMLDocument parser and model to interrogate 
these scripts.

Is there any practical way to embed 'auxilliary' snippets of XML in a Nant 
script?  Does anyone have any other ideas for incorporating snippets of XML in 
a Nant script?

Thanks,

Ken Parrish
Gomez, Inc.
--
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] FW: Embedded XML in Nant scripts ...

2009-06-25 Thread Parrish, Ken
Bob, et. al.,

I grabbed the install image for CI Factory and scoured the code.  It appears 
like the developers have implemented A LOT of Nant extensions that could be 
useful, including a largeproperty element.  As far as I can tell so far, 
largeproperty supports both direct XML plain text, or CDATA string content.  
XML content is indicated by a property option.  There is also an option for 
Nant style expansion ( ${ . } ) within the content upon reference.

In the CI Factory Nant extension library, there appear as well to be some 
advanced XML parsing and generation tasks via functions which are more or less 
a pass through to the XmlTextReader / XmlTextWriter in the .NET libraries.  I 
also noticed a reference to an ifthenelse task-could be interesting.

In looking through their scripts, it appears that they use the largeproperty 
a great deal for generation of HTML code for error messages, e-mail and 
auto-generated web pages.  But, I believe that any well-formed XML will  work.

The question yet to be answered yet is whether there is a practical way to 
parse the largeproperty content in a Nant script, to selectively retrieve 
portions of it.  If so, largeproperty could be used to pass around structured 
data.  In my case, I simply want to embed structured data in a Nant script that 
will be parsed by an external program.

I haven't tried these out yet, but I'm going to try dumping the CI Factory Nant 
extension DLL in my Nant directory and see if I can get this to work.  I will 
also contact the developers and see if I can get the source code to their Nant 
extension library so we could extract portions as needed.

Ken Parrish
Gomez, Inc.

Examples culled from their scripts:

largeproperty name=Alerts.SendMessage.Content
  value expand=true xml=true
html
  head
  /head
  body
p${datetime::now()}/p
p
  a href=${UrlToThisBuild}${CCNetLabel}/a
/p

p${Alerts.Developer.Name},/p
pThank you for reducing the number of lines of code from 
${Alerts.ChangePackageSize.Previous.LineCount} to 
${Alerts.ChangePackageSize.LineCount}./p
br/
pCheers,/p
pYour pal, the build server./p
  /body
/html
  /value
/largeproperty

 
largeproperty name=Packages.AddCleanUpActions.Block
  value xml=false
![CDATA[call target=SourceControl.CleanGetOfThirdPartyDirectory /
call target=SourceControl.CleanGetOfProductDirectory /]]
  /value
/largeproperty









From: Bob Archer [mailto:bob.arc...@amsi.com] 
Sent: Wednesday, June 24, 2009 10:37 AM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: Embedded XML in Nant scripts ...

CI Factory has a largestring property which allows you to embed XML IIRC 
correctly. You may be able to snag it.

BOb


From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: Wednesday, June 24, 2009 9:47 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Embedded XML in Nant scripts ...

I have a need to embed 'extra' information in a Nant script.  We've developed a 
configuration management database and have various crawlers and update engines, 
one of which parses existing Nant scripts collecting configuration management 
data embedded as properties in our build scripts.

There are occasions when it would be useful to insert additional information in 
a build script beyond using just properties.  In particular, snippets of 
structured XML.  I'm using the .NET XMLDocument parser and model to interrogate 
these scripts.

Is there any practical way to embed 'auxilliary' snippets of XML in a Nant 
script?  Does anyone have any other ideas for incorporating snippets of XML in 
a Nant script?

Thanks,

Ken Parrish
Gomez, Inc.

--
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] LoaderException ...

2009-06-26 Thread Parrish, Ken
I am having trouble getting Nant to load some custom designed tasks.  I get the 
following message:

[loadtasks] Failure scanning C:\Program Files\Nant\bin\GPNCustomExtensions. 
Tasks.dll for extensions. Unable to load one or more of the requested types. 
Retrieve the LoaderExceptions property for more information.

How do I retrieve the LoaderExtensions property?

Thanks,

Ken Parrish
Gomez, Inc.



--
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Building a WPF project in Nant

2009-07-20 Thread Parrish, Ken
Ankit,

I don't build WPF projects, but I do build all manner of other complicated .NET 
3.5 projects such as WCF, Entity Framework, WorkFlow--some with mixed .NET 
versions--the works.

But, the only practical, reliable way to do this is to call MSBuild.  Either 
the msbuild task from NantContrib or the exec task will work.

Give MSBuild a try and let us know if you run into problems--we might be able 
to help.

Ken Parrish
Gomez, Inc.

-Original Message-
From: ankitsolanki13 [mailto:ankit_sola...@persistent.co.in] 
Sent: Friday, July 17, 2009 6:11 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Building a WPF project in Nant


Hi,
I am trying to build a WPF project having xaml file using csc task in nant
and it gives me several error like this :-
error CS0103: The name 'InitializeComponent' does not exist in the current
context

I have checked all build and assembly refrence but the error remains
same.Can I build a WPF project using csc task or any other task is used for
this purpose.

Any pointer in this direction is highly appreciable

Thanks in advance.

-Ankit


-- 
View this message in context: 
http://www.nabble.com/Building-a-WPF-project-in-Nant-tp24530969p24530969.html
Sent from the NAnt - Users mailing list archive at Nabble.com.


--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] XML DOM tasks ...

2009-09-29 Thread Parrish, Ken
Several months ago, I seem to recall coming across some Nant extension tasks 
for manipulating XML files in a similar manner as the XML DOM library in .NET . 
 Basically, they were wrappers for XmlDocument, XmlElement, XmlNode and 
XmlAttribute.

Does anyone know if or where such a library can be found?

Thanks,

Ken Parrish
Gomez, Inc.
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Input prompting ...

2009-11-03 Thread Parrish, Ken
Nant Users,

Is there a task that can be used to prompt a user for input of a property?  I'd 
like to design some tasks which will prompt the user for input of a property if 
the property was not specified on the command line.  I looked in both Nant and 
NantContrib and didn't see anything.  Am I missing something?

Ken Parrish
Gomez, Inc.
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Input prompting ...

2009-11-03 Thread Parrish, Ken
Mike,

This looks like it will work just fine.  I have a custom Nant extensions 
project and will add this in that DLL.

Thanks,

Ken Parrish
Gomez, Inc.

From: Michael Pento [mailto:mpe...@metratech.com] 
Sent: Tuesday, November 03, 2009 12:52 PM
To: Parrish, Ken; nant-users@lists.sourceforge.net
Subject: RE: [NAnt-users] Input prompting ...

Good Afternoon Folks,

I was just playing around with this and I was able to do it with a C# script 
function in a target:

target name=getUserInput
   script language=C# prefix=build
    code![CDATA[
        [Function(getInput)]
    public static string getInput()
    {
        Console.WriteLine(Enter a string: );
    string s = Console.ReadLine();
   
 
    return s.ToString();
    }
    ]]/code
    /script
    
    property name=_str value=${build::getInput()} /
    echo message= Input String: ${_str} /
/target

Executing this on my machine produces the following output:

C:\nant -f:test.build getUserInput
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:/test.build
Target framework: Microsoft .NET Framework 3.5
Target(s) specified: getUserInput

[loadtasks] Scanning assembly NAnt.Contrib.Tasks for extensions.
[loadtasks] Scanning assembly broloco.NAntTasks for extensions.
   [script] Scanning assembly cb5myvqk for extensions.

getUserInput:

   [script] Scanning assembly vohtvvkh for extensions.
Enter a string:
This is a test string!!
 [echo]  Input String: This is a test string!!

BUILD SUCCEEDED

Total time: 8.4 seconds.

This stores the input into a property and you can do whatever you like with it 
after that.

I hope this helps,
Mike


From: Parrish, Ken [mailto:kparr...@gomez.com] 
Sent: Tuesday, November 03, 2009 9:34 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Input prompting ...

Nant Users,

Is there a task that can be used to prompt a user for input of a property?  I'd 
like to design some tasks which will prompt the user for input of a property if 
the property was not specified on the command line.  I looked in both Nant and 
NantContrib and didn't see anything.  Am I missing something?

Ken Parrish
Gomez, Inc.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Upate to 0.90, missing CR-LF ...

2010-07-12 Thread Parrish, Ken
I just updated to Nant 0.90.

I have a script with a bunch of echo statements that create the text for an 
e-mail.

With the update to 0.90, the echo statement do not appear to emit a CR-LF at 
the end of each line.

Any clues?  Explanations for the change in behavior?

echo file=messagefile.txt append=true| BUILD INFO/echo

Previous, messsagefile.txt would have a CR-LF at the end of each line.  No 
longer.

Thanks,

Ken Parrish
Gomez, Inc.
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Upate to 0.90, missing CR-LF ...

2010-07-12 Thread Parrish, Ken
I found documentation indicating that since 0.86, newlines are no longer 
automatically emitted when echo is directed to a file.

How do I emit a newline into a file?  This is Windows, so I need a CR/LF 
combination.

Thanks,

Ken Parrish

From: Parrish, Ken [mailto:kparr...@gomez.com]
Sent: Monday, July 12, 2010 11:03 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Upate to 0.90, missing CR-LF ...

I just updated to Nant 0.90.

I have a script with a bunch of echo statements that create the text for an 
e-mail.

With the update to 0.90, the echo statement do not appear to emit a CR-LF at 
the end of each line.

Any clues?  Explanations for the change in behavior?

echo file=messagefile.txt append=true| BUILD INFO/echo

Previous, messsagefile.txt would have a CR-LF at the end of each line.  No 
longer.

Thanks,

Ken Parrish
Gomez, Inc.
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Building Java apps from a Nant script ....

2010-09-29 Thread Parrish, Ken
It looks like I am going to have to integrate some Java project builds into an 
existing Nant based configuration management system.  I looked at the Task 
Reference for Nant and NantContrib, and was surprised not to find direct 
support for an Ant or Java task in either library.  The Java project that I 
need to support already has an Ant script.

What is the best / preferred method for integrating a Java build into a typical 
Nant script?

Thanks,

Ken Parrish
Gomez, Inc.


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


[NAnt-users] Copy task and file write time stamp ...

2010-10-05 Thread Parrish, Ken
The default behavior of the copy task is that file write times  for the 
source file are reflected at the destination.

Is there a way to change the behavior of the copy task such that the last 
file write time for the destination file is set to the current time?

Is there a separate task in Nant that can be used to modify the last file write 
time for a file at a specific location?

Thanks,

Ken
--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


Re: [NAnt-users] Copy task and file write time stamp ...

2010-10-05 Thread Parrish, Ken
Do ...  didn't see that in the task list.

Thanks,

Ken

From: Bob Archer [mailto:bob.arc...@amsi.com]
Sent: Tuesday, October 05, 2010 3:56 PM
To: Parrish, Ken; NAnt-users@lists.sourceforge.net
Subject: RE: Copy task and file write time stamp ...

touch?

From: Parrish, Ken [mailto:kparr...@gomez.com]
Sent: Tuesday, October 05, 2010 2:50 PM
To: NAnt-users@lists.sourceforge.net
Subject: [NAnt-users] Copy task and file write time stamp ...

The default behavior of the copy task is that file write times  for the 
source file are reflected at the destination.

Is there a way to change the behavior of the copy task such that the last 
file write time for the destination file is set to the current time?

Is there a separate task in Nant that can be used to modify the last file write 
time for a file at a specific location?

Thanks,

Ken
--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users