[nant-dev] Problem with exec task and CMD/BAT files?
I am having difficulty getting a CMD file to execute with NAnt. I'm using Win2000 and I have specified the following: property name=project.base.dir value=C:\Projects\Reference_Database/ property name=sqlserver.name value=localhost\VSdotNET/ property name=database.name value=Reference/ property name=commandfile.name value=Create_Reference_Database.cmd/ target name=build-database description=Install the database using the CMD File exec verbose=true basedir=${project.base.dir} program=${commandfile.name} commandline=${sqlserver.name} ${database.name} timeout=30/ /target The CMD File (which is like a batch file) will not execute and hangs with the following lines: build-database: [exec] C:\Projects\Reference_Database\Create_Reference_Database.cmd localhost\VSdotNET Reference [exec] C:\Projects\Reference_DatabaseC:\Projects\Reference_Database\Create_Reference_D atabase.cmd localhost\VSdotNET Reference I can manually run the cmd from a command prompt and it executes without a problem. I've tried renaming it to a .bat file and I have the same problem. Thanks, -Aaron --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
Re: [nant-dev] Building and deploying applications with Nant
I'm not sure I really understand the situation, but I'll take a crack. Ben Singh wrote: In this example I have a core.dll, customer.dll, customerWS.dll and a businessportal.dll. If something in businessportal.dll changes then as far as I know a complete build needs to be performed. I'm confused by this. If something in an assembly that nothing else depends on changes, why would you need to recompile anything besides that assembly? If you change businessportal.dll, I don't see why you'd need a complete build. However in theory only the businessportal.dll should need to be recompiled. This means that the entire site has to be recompiled (because I am using strong names) and more importantly redeployed. I'd first question whether you need strong names, but that's just me, avoiding complexity at all costs :-) The scale of the problem becomes a lot larger when you have deployments over multiple machines. Then the deployment scenario for a small change becomes a lot more horrendous. Down time is a critical factor in our business and if we don't achieve a certain level of uptime then we violate or contractual obligations. It would be good to hear from some other people to see whether they are experiencing the same types of problems. We have load balanced systems where the load balancer (a Cisco Content Switch, I think) allows you to shut off a machine and drain traffic off of that server. Once that's been done, you can deploy that server and bring it back into rotation. If you have version problems (what you're deploying is totally incompatible with the prior version and can't co-exist at all, even for a few minutes), then you'd have to set up a stovepiped environment, or install one set of boxes and then work out some way to bring the new ones online while simultaneously bringing the old ones offline. Given that uptime is so critical, I'd say that you're best off trying to avoid situations where you're deploying stuff that breaks what's out there. In short, it doesn't sound to me like you have a NAnt problem, it sounds like you have an architectural problem. Like I said, I may be totally misreading your situation, but that's what it sounds like to me. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
RE: [nant-dev] Building and deploying applications with Nant
Thanks for your response Gordon, Let me try and clarify my situation. 1) You are indeed correct that if only businessportal.dll changes then only that dll should be rebuilt. 2) If customer.dll changes then customer.dll, customerWS.dll and businessportal.dll need to be rebuilt. However with Nant there is no way of rebuilding only these dll's. Currently core.dll, customer.dll, customerWS.dll and businessportal.dll would all have to be rebuilt. If I could get Nant to recompile everything downstream from the customer assembly (ie customer.dll, customerWS.dll and businessportal.dll) then my main problem would be solved). 3) By rebuilding all the dll's the assembly versions change and hence the manifest now points to a different version of the assembly. Therefore all the assemblies need to be redeployed. I hope I did a better job of clarifying my problem. Thanks Ben -Original Message- From: Gordon Weakliem [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 21 January 2003 2:18 PM To: Ben Singh Cc: [EMAIL PROTECTED] Subject: Re: [nant-dev] Building and deploying applications with Nant I'm not sure I really understand the situation, but I'll take a crack. Ben Singh wrote: In this example I have a core.dll, customer.dll, customerWS.dll and a businessportal.dll. If something in businessportal.dll changes then as far as I know a complete build needs to be performed. I'm confused by this. If something in an assembly that nothing else depends on changes, why would you need to recompile anything besides that assembly? If you change businessportal.dll, I don't see why you'd need a complete build. However in theory only the businessportal.dll should need to be recompiled. This means that the entire site has to be recompiled (because I am using strong names) and more importantly redeployed. I'd first question whether you need strong names, but that's just me, avoiding complexity at all costs :-) The scale of the problem becomes a lot larger when you have deployments over multiple machines. Then the deployment scenario for a small change becomes a lot more horrendous. Down time is a critical factor in our business and if we don't achieve a certain level of uptime then we violate or contractual obligations. It would be good to hear from some other people to see whether they are experiencing the same types of problems. We have load balanced systems where the load balancer (a Cisco Content Switch, I think) allows you to shut off a machine and drain traffic off of that server. Once that's been done, you can deploy that server and bring it back into rotation. If you have version problems (what you're deploying is totally incompatible with the prior version and can't co-exist at all, even for a few minutes), then you'd have to set up a stovepiped environment, or install one set of boxes and then work out some way to bring the new ones online while simultaneously bringing the old ones offline. Given that uptime is so critical, I'd say that you're best off trying to avoid situations where you're deploying stuff that breaks what's out there. In short, it doesn't sound to me like you have a NAnt problem, it sounds like you have an architectural problem. Like I said, I may be totally misreading your situation, but that's what it sounds like to me. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
Re: [nant-dev] Problem with exec task and CMD/BAT files?
Without seeing the batch file, it is hard to say. Is it possible that your batch file is hanging for path or timeout reasons? (BTW. I don't think the timeout on exec actually works.) Here is a simple sample I created to test with. echo.cmd @echo off echo Command Line Args: FOR %%a IN (%*) DO echo %%a ---cmd.build--- ?xml version=1.0 ? project name=cmd property name=sqlserver.name value=localhost\VSdotNET/ property name=database.name value=Reference/ exec verbose=true basedir=. program=echo.cmd commandline=${sqlserver.name} ${database.name} timeout=30 / /project I tested with the current version of nant that is in cvs. The output was: bin\nant -buildfile:c:\temp\cmd.xml Buildfile: file:///c:/temp/cmd.xml [exec] c:\temp\echo.cmd localhost\VSdotNET Reference [exec] c:\tempc:\temp\echo.cmd localhost\VSdotNET Reference Command Line Args: localhost\VSdotNET Reference BUILD SUCCEEDED Total time: 0 seconds - Original Message - Sent: Monday, January 20, 2003 11:38 AM Subject: [nant-dev] Problem with exec task and CMD/BAT files? I am having difficulty getting a CMD file to execute with NAnt. I'm using Win2000 and I have specified the following: property name=project.base.dir value=C:\Projects\Reference_Database/ property name=sqlserver.name value=localhost\VSdotNET/ property name=database.name value=Reference/ property name=commandfile.name value=Create_Reference_Database.cmd/ target name=build-database description=Install the database using the CMD File exec verbose=true basedir=${project.base.dir} program=${commandfile.name} commandline=${sqlserver.name} ${database.name} timeout=30/ /target The CMD File (which is like a batch file) will not execute and hangs with the following lines: build-database: [exec] C:\Projects\Reference_Database\Create_Reference_Database.cmd localhost\VSdotNET Reference [exec] C:\Projects\Reference_DatabaseC:\Projects\Reference_Database\Create_Referen ce_D atabase.cmd localhost\VSdotNET Reference I can manually run the cmd from a command prompt and it executes without a problem. I've tried renaming it to a .bat file and I have the same problem. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
RE: [nant-dev] Building and deploying applications with Nant
It definitely sounds like a job for the not-yet-existing (?) uptodate task. In the interim, I shudder to suggest a frankenstein'd combination of ant tasks doing the uptodate checks which then fire off separate nant tasks via some kludgy use of the ant's exec command. It would require yanking all the depends tags out of the nant script, which then makes you wonder about the usefulness of owning such a script. Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Ben Singh Sent: Monday, January 20, 2003 7:42 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [nant-dev] Building and deploying applications with Nant Thanks for your response Gordon, Let me try and clarify my situation. 1) You are indeed correct that if only businessportal.dll changes then only that dll should be rebuilt. 2) If customer.dll changes then customer.dll, customerWS.dll and businessportal.dll need to be rebuilt. However with Nant there is no way of rebuilding only these dll's. Currently core.dll, customer.dll, customerWS.dll and businessportal.dll would all have to be rebuilt. If I could get Nant to recompile everything downstream from the customer assembly (ie customer.dll, customerWS.dll and businessportal.dll) then my main problem would be solved). 3) By rebuilding all the dll's the assembly versions change and hence the manifest now points to a different version of the assembly. Therefore all the assemblies need to be redeployed. I hope I did a better job of clarifying my problem. Thanks Ben -Original Message- From: Gordon Weakliem [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 21 January 2003 2:18 PM To: Ben Singh Cc: [EMAIL PROTECTED] Subject: Re: [nant-dev] Building and deploying applications with Nant I'm not sure I really understand the situation, but I'll take a crack. Ben Singh wrote: In this example I have a core.dll, customer.dll, customerWS.dll and a businessportal.dll. If something in businessportal.dll changes then as far as I know a complete build needs to be performed. I'm confused by this. If something in an assembly that nothing else depends on changes, why would you need to recompile anything besides that assembly? If you change businessportal.dll, I don't see why you'd need a complete build. However in theory only the businessportal.dll should need to be recompiled. This means that the entire site has to be recompiled (because I am using strong names) and more importantly redeployed. I'd first question whether you need strong names, but that's just me, avoiding complexity at all costs :-) The scale of the problem becomes a lot larger when you have deployments over multiple machines. Then the deployment scenario for a small change becomes a lot more horrendous. Down time is a critical factor in our business and if we don't achieve a certain level of uptime then we violate or contractual obligations. It would be good to hear from some other people to see whether they are experiencing the same types of problems. We have load balanced systems where the load balancer (a Cisco Content Switch, I think) allows you to shut off a machine and drain traffic off of that server. Once that's been done, you can deploy that server and bring it back into rotation. If you have version problems (what you're deploying is totally incompatible with the prior version and can't co-exist at all, even for a few minutes), then you'd have to set up a stovepiped environment, or install one set of boxes and then work out some way to bring the new ones online while simultaneously bringing the old ones offline. Given that uptime is so critical, I'd say that you're best off trying to avoid situations where you're deploying stuff that breaks what's out there. In short, it doesn't sound to me like you have a NAnt problem, it sounds like you have an architectural problem. Like I said, I may be totally misreading your situation, but that's what it sounds like to me. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers