<target name="deployBar" description="deploys a bar file">
<echo message="Executing mqsideploy -n '${broker}' -e '${integrationServer}' -a '${servicename}-${version}-${environment}.bar'"/>
<exec executable="${mqsideploy.path}" inputstring="abcd" failonerror="false">
<arg value="-n" />
<arg value="${broker}" />
<arg value="-e" />
<arg value="${integrationServer}" />
<arg value="-a" />
<arg value="${servicename}-${version}-${environment}.bar" />
<arg value="-w" />
<arg value="2145336164" />
</exec>
</target>
I am trying to use the above Ant script on my Windows machine to compile a message broker application, create a deployable BAR file and finally deploy it to a secured Integration node. The Integration node is secured by digital certificates by a userid/password.
I am stuck passing the password to the deployment command and the command fail with message "BIP1936E: Authentication failure when connecting to the secured remote integration node 'localhost:4415'. Please specify a valid userid and password."
I have verified the password by manually executing the same command through command console. I am attaching the build.xml snippet that I tried out. Let me know, if the format of passing the password is correct i.e. inputstring="abcd".
Related
We use NAnt to stop the service, replace the files and start it backup.
<echo message="Waiting for Service to stop."/>
<property name="stopWait" value="360" />
<call target="stopServiceWait" />
... which calls below block
<!--Waits specified number of seconds or until service is stopped.-->
<target name="stopServiceWait">
<if test="${int::parse(stopWait) > 0}">
<echo message="Stopping Service... Waiting ${stopWait} more seconds..."/>
<property name="stopWait" value="${int::parse(stopWait) - 1}" />
<property name="isStopped" value="${service::is-stopped(bf.serviceName, bf.serverName)}" />
<echo message="isStopped - ${isStopped}"/>
<if test="${isStopped == 'False'}">
<sleep seconds="1" />
<echo message="Service is still not stopped"/>
<call target="stopServiceWait" />
</if>
</if>
</target>
However after stopping the service the process often continues running for quite a few seconds, blocking the files. So we just wait some more time right now:
<!--Wait another 60 sec.-->
<echo message="Sleeping additional 60 seconds to ensure that process shuts down after stop."/>
<sleep seconds="60" />
Often long wait is not necessary and just extends outage, or sometimes it is not enough and the deployment has to be restarted.
Question:
Is there a way to check from NANT if the process with the certain name exists?
Using WiX 3.10.3
I have a service which has failed to start during the installation process. It is desired that this failure to start NOT cause the installation to fail and roll back.
My service config:
<ServiceInstall Id="ServiceInstall" Name="MyService" DisplayName="My Service"
Description="My Service Description" ErrorControl="ignore" Vital="yes"
Account="LOCALSYSTEM" Type="ownProcess" Start="auto" Interactive="no" />
<ServiceConfig ServiceName="MyService" DelayedAutoStart="yes" OnInstall="yes" OnReinstall ="yes" />
<ServiceControl Id="ServiceControl" Name="MyService" Start="install" Stop="both" Remove="uninstall" Wait="yes" />
I have not come across the right combination of attributes which would permit the installer to attempt to start the service but ignore the result. Is this possible?
When I tried to create a virtual directory in the remote server using NAnt build script It could not create and shows the error message below:
The webservice at 'remote_machine' does not exist or is not reachable
The OS of remote server is Windows server 2008. Here I have used NAnt 0.92 and natcontrib 0.92.
Any suggestions would be appreciated.
EDiT: It is working for local machine but not for the remote. Any suggestion Please.
the code portion:
<property name="serverName" value="MyServer"/>
<property name="currentDeployName" value="Research"/>
<property name="deployDir" value="\\${serverName}\wwwroot\${currentDeployName}"/>
<property name="currentDir" value="${deployDir}"/>
<property name="DeployWebDir" value="${sourceDir}\Deployment\Deployment.Web"/>
<property name="webrootDir" value="C:\Inetpub\wwwroot"/>
<deliisdir iisserver="${serverName}" vdirname="${currentDeployName}" />
<mkdir dir="${deployDir}" />
<copy todir="${deployDir}" overwrite="true">
<fileset basedir="${DeployWebDir}">
<include name="**\*" />
</fileset>
</copy>
<mkiisdir iisserver="${serverName}" dirpath="${webrootDir}\${currentDeployName}"
vdirname="${currentDeployName}"/>
I am creating a POC . I am trying to send "Authorization : Bearer " to a webservice proxy .
How can i do this using Class Mediation in WSO2ESB .
And also how can i modify the old payload by adding the new payload .... with in class Mediation
Please try the following:
<property name="Authorization" value="Bearer" scope="transport"/>
Changing the payload can be done in a number of ways, one way to change the whole payload is using the payloadFactory.
<payloadFactory>
<format>
<m:getquote xmlns:m="http://services.samples">
<m:request>
<m:symbol>$1</m:symbol>
</m:request>
</m:getquote>
</format>
<args>
<arg expression="//m0:Code" xmlns:m0="http://services.samples"/>
</args>
</payloadFactory>
Or the same can be achieved with the enrich mediator:
<enrich>
<source type="inline" clone="false">
<m:getquote xmlns:m="http://services.samples">
<m:request>
<m:symbol>$1</m:symbol>
</m:request>
</m:getquote>
</source>
<target type="body" action="replace" />
</enrich>
<enrich>
<source type="property" clone="true" property="PATIENTS"/>
<target xmlns:m="http://services.samples" xpath="//m:symbol"/>
</enrich>
Hope this helps
Regards, nidkil
I'm trying to setup an Ant Target to perform a remote deploy on a JBoss 6.x server, using Cargo.
Here is my target description:
<target name="deploy" depends="install-cargo,make-war">
<input message="Enter username for deployment..."
addproperty="deploy.username" />
<input message="Enter password for ${deploy.username}..."
addproperty="deploy.password" >
<handler type="secure" />
</input>
<cargo containerId="jboss6x" action="redeploy" type="remote">
<configuration type="runtime">
<property name="cargo.hostname" value="${deploy.host}" />
<property name="cargo.servlet.port" value="${deploy.host}" />
<property name="cargo.remote.username" value="${deploy.username}" />
<property name="cargo.remote.password" value="${deploy.password}" />
<deployable type="war" file="${dist.dir}/${ant.project.name}.war">
<property name="context" value="${ant.project.name}" />
</deployable>
</configuration>
</cargo>
Every jar inside [jboss.home]/client and [jboss.home]/lib is inside cargo.tasks classpath but when i try to execute the Target I get this error:
javax.security.auth.login.LoginException: impossibile trovare la classe LoginModule: org.jboss.security.ClientLoginModule
That is Java cannot find class org.jboss.security.ClientLoginModule (by the way: this class is located inside jbosssx.jar in [jboss.home]/lib).
Am I missing some jar? Do I need to configure something for jaas? Thanks for your help.