I was getting an invalid command line error when trying to invoke the tibant:administrator tasks under Linux. (see tibant.xml round line 1620)
<exec executable="${tibco.home.tra}/bin/AppManage"
taskname="@{taskname}"
resultproperty="appmanage.result"
failonerror="false"
outputproperty="appmanage.output">
<arg value='--propFile' />
<arg value='${tibco.home.tra}/bin/AppManage.tra' />
<arg value='-batch@{action}' />
<arg value='-domain' />
<arg value='@{domain}' />
<arg line='${cred.arg}' />
<arg value='-dir' />
<arg value='@{working-dir}' />
<arg line='${desc.arg}' />
<arg value='${nostart.arg}' />
<arg value='${nostop.arg}' />
<arg value='${force.arg}' />
</exec>
The problem is Linux does not handle empty parameters in the exec task. For example: '${nostart.arg} is empty (for the config task)
The solution was to use a switch depending on the task needed:
<property name="switch.value" value="@{action}"/>
<switch value="${switch.value}">
<case value="config">
<exec executable="${tibco.home.tra}/bin/AppManage"
taskname="@{taskname}"
resultproperty="appmanage.result"
failonerror="false"
outputproperty="appmanage.output">
<arg value='--propFile' />
<arg value='${tibco.home.tra}/bin/AppManage.tra' />
<arg value='-batch@{action}' />
<arg value='-domain' />
<arg value='@{domain}' />
<arg line='${cred.arg}' />
<arg value='-dir' />
<arg value='@{working-dir}' />
<arg line='${desc.arg}' />
</exec>
</case>
<case value="deploy">
<exec executable="${tibco.home.tra}/bin/AppManage"
taskname="@{taskname}"
resultproperty="appmanage.result"
failonerror="false"
outputproperty="appmanage.output">
<arg value='--propFile' />
<arg value='${tibco.home.tra}/bin/AppManage.tra' />
<arg value='-batch@{action}' />
<arg value='-domain' />
<arg value='@{domain}' />
<arg line='${cred.arg}' />
<arg value='-dir' />
<arg value='@{working-dir}' />
<arg line='${desc.arg}' />
<arg value='${nostart.arg}' />
<arg value='${nostop.arg}' />
</exec>
</case>
<!-- other cases here ----------------------------------------------------------------->
<default>
<exec executable="${tibco.home.tra}/bin/AppManage"
taskname="@{taskname}"
resultproperty="appmanage.result"
failonerror="false"
outputproperty="appmanage.output">
<arg value='--propFile' />
<arg value='${tibco.home.tra}/bin/AppManage.tra' />
<arg value='-batch@{action}' />
<arg value='-domain' />
<arg value='@{domain}' />
<arg line='${cred.arg}' />
<arg value='-dir' />
<arg value='@{working-dir}' />
<arg line='${desc.arg}' />
<arg value='${nostart.arg}' />
<arg value='${nostop.arg}' />
<arg value='${force.arg}' />
</exec>
</default>
</switch>