Author |
Message
|
Vanshul_MB |
Posted: Tue Apr 12, 2011 11:45 am Post subject: mqsideloy command environment setup |
|
|
Acolyte
Joined: 09 Feb 2011 Posts: 68
|
Hi,
I have written the below script
<?xml version="1.0"?>
<project name="project" basedir="." default="run">
<!-- set global properties for this build -->
<property file="build.conf" />
<target name="run" description="">
<antcall target="mqsideploybar.deploy" />
</target>
<!--
Target to deploy the broker archive using mqsideploy
-->
<target name="mqsideploybar.deploy">
<echo message="Deploying Broker Archive file: ${bar.name} " />
<exec executable="${deploy.dir}\mqsiprofile.cmd"/>
<echo message="${deploy.dir}\mqsideploy.exe"/>
<exec executable="${deploy.dir}\mqsideploy.exe" spawn="false">
<arg value="${broker.name}" />
<arg value="-a"/>
<arg value="${bar.name}" />
<arg value ="-i"/>
<arg value ="${qm.ip}"/>
<arg value ="-p"/>
<arg value ="${qm.port}"/>
<arg value ="-q"/>
<arg value ="${qm.name}"/>
<arg value ="-e"/>
<arg value ="${executiongroup.name}"/>
</exec>
<echo message="Completed deploying Broker Archive file - ${bar.name} " />
</target>
</project>
The result i am getting is
C:\apache-ant-1.8.2-bin\apache-ant-1.8.2\bin>ant -buildfile deploy_EI0012.xml
Buildfile: C:\apache-ant-1.8.2-bin\apache-ant-1.8.2\bin\deploy_EI0012.xml
run:
mqsideploybar.deploy:
[echo] Deploying Broker Archive file: C:\apache-ant-1.8.2-bin\apache-ant-1.
8.2\binBar\Accor.bar
[exec]
[exec] MQSI 7.0.0.2
[exec] C:\Program Files (x86)\IBM\MQSI\7.0
[exec]
[echo] C:\Program Files (x86)\ibm\MQSI\7.0\bin\mqsideploy.exe
[exec] The user environment was not adequately prepared to continue executi
on. Locate and run the profile supplied with the product. This file is called mq
siprofile, and is located in the bin subdirectory for the product.
[exec] Result: -1
[echo] Completed deploying Broker Archive file - C:\apache-ant-1.8.2-bin\ap
ache-ant-1.8.2\binBar\Accor.bar
BUILD SUCCESSFUL
Total time: 1 second
What else is required?
Thanks |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 12, 2011 11:53 am Post subject: Re: mqsideloy command environment setup |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vanshul_MB wrote: |
What else is required? |
Never tried this with WMBv7, but if I'd seen this in v6:
Vanshul_MB wrote: |
The user environment was not adequately prepared to continue execution. Locate and run the profile supplied with the product. This file is called mqsiprofile, and is located in the bin subdirectory for the product. |
I'd have said the mqsiprofile supplied with the product and located in the bin subdirectory for the product had not been run by the ant script.
Of course, that's just a guess. The error message is so ambigious....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vanshul_MB |
Posted: Tue Apr 12, 2011 11:54 am Post subject: |
|
|
Acolyte
Joined: 09 Feb 2011 Posts: 68
|
Thanks Vitor.But i think mqsiprofile ran as we can see this
[exec]
[exec] MQSI 7.0.0.2
[exec] C:\Program Files (x86)\IBM\MQSI\7.0
[exec] |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 12, 2011 11:58 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Each exec target runs in a separate shell. |
|
Back to top |
|
 |
Vanshul_MB |
Posted: Tue Apr 12, 2011 11:59 am Post subject: |
|
|
Acolyte
Joined: 09 Feb 2011 Posts: 68
|
Can you please help me with this script?
I am stuck up with deployments  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 12, 2011 12:00 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vanshul_MB wrote: |
Thanks Vitor.But i think mqsiprofile ran as we can see this |
Then your script is clearly working & you didn't get an error message.
Perhaps the way the mqsiprofile is being run by ant.....?
Because it does something fairly specific.....? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 12, 2011 12:01 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vanshul_MB wrote: |
Can you please help me with this script?
I am stuck up with deployments  |
What's the hourly rate? Where do we send the invoice?
Is there chocolate cake? (Sorry, still obsessed) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vanshul_MB |
Posted: Tue Apr 12, 2011 12:03 pm Post subject: |
|
|
Acolyte
Joined: 09 Feb 2011 Posts: 68
|
i am give Cup cakes  |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 12, 2011 12:12 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vanshul_MB wrote: |
i am give Cup cakes  |
Close enough.
My most worthy associate has already mostly given you the solution:
mqjeff wrote: |
Each exec target runs in a separate shell |
So whilst you did run mqsiprofile, you didn't run it in the same place as mqsideploy. So all of the work mqsiprofile did setting up the environment was wasted. So ant didn't run mqsiprofile before mqsideploy, just like the message says. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 12, 2011 12:14 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I wonder if a search for previous posts discussing ant will provide a resolution? |
|
Back to top |
|
 |
Vanshul_MB |
Posted: Tue Apr 12, 2011 12:20 pm Post subject: |
|
|
Acolyte
Joined: 09 Feb 2011 Posts: 68
|
Sorry to bug u but how to do it in the above script?
I tried but didnt happened |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 12, 2011 12:33 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vanshul_MB wrote: |
I tried but didnt happened |
Tried what? There's only 1 thing you can try?
One thing you can certainly try is reviewing some of the many discussions on this forum regarding the use of ant.
One other thing you can try is doing a google on ant & reviewing how it handles command shells.
For cup cakes, that's all you're getting. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vanshul_MB |
Posted: Tue Apr 12, 2011 1:19 pm Post subject: |
|
|
Acolyte
Joined: 09 Feb 2011 Posts: 68
|
we can create a batch file or something as each exec will run under diff shell.
I havent worked on these components so googleing for now.Else will seek your hel. |
|
Back to top |
|
 |
|