deployNRun - running script on target not working
I'm running a Windows2000-to-Windows2000 deployment using OpenDeploy 5.5.1. The actual deployment is running perfectly, but I'm struggling to execute a post-deploy script on my target (which happens to be my laptop). The logs tell me that the script worked OK, but when I check I can see that this is not really the case.
To illustrate, here is the <deployment> node of my Deployment Configuration XML:
<deployment transactional="yes">
<execDeploymentTask useDefinition="owners_wls_deploy">
<deployNRun>
<dnrDeployment location="target" when="after" state="success">
<script cmd="command_line_redeploy.cmd" async="no" where="B:\user_projects\domains\TestDomain\stage" />
</dnrDeployment>
</deployNRun>
</execDeploymentTask>
<execDeploymentTask useDefinition="owners_static_deploy" />
</deployment>
The purpose of this is to run a Weblogic-specific command to activate my newly-pushed JSP files on a cluster of servers. The command_line_redeploy.cmd batch script, which sits in B:\user_projects\domains\TestDomain\stage\ on my laptop, works like a champ when I run it locally from the command prompt. I get the exact behavior that I expect. However, when I run it as part of my deployment, using the snippet above, nothing happens. The log file on my receiver/laptop tells me that all is well, however:
(2) id=0 server: Executed script [command_line_redeploy.cmd] where [B:/user_projects/domains/TestDomain/stage] as [] succeeded
In order to debug this a little further, I decided to pipe the output from my .cmd script to a simple text file, which in theory should let me know what OpenDeploy is up to. I changed the <deployment> node of my Deployment Configuration XML to be more like:
<script cmd="command_line_redeploy.cmd >> c:\temp\odlog.txt" async="no" where="B:\user_projects\domains\TestDomain\stage" />
When I run the script, as expected, I get the output in c:\temp\odlog.txt on my laptop - this proves that the script is there and accessible. However, instead of a list of Weblogic Deployer output, odlog.txt contains a single line representing the directory in which to run the script, and the content of the command_line_redeploy.cmd script itself:
B:\user_projects\domains\TestDomain\stage>java weblogic.Deployer -adminurl t3://localhost:9999 -username test -password testtest -name test_ear -targets testwebapp@TestAppCluster -verbose -redeploy testwebapp\index.jsp
So, basically, OpenDeploy is finding the script, is reading the contents of the file, but does not seem to execute those contents.
Hopefully this is clear enough. This is my first experience with OpenDeploy, but I've pored over the documentation and had a fresh set of eyes look at my script and I have no idea why it would not work (or, more accurately, only kinda work). I've got a follow-on question, but really need this to work before I can move on.
Any help is greatly appreciated! Thanks.