ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry Pape" <>
Subject exec with -t argument
Date Fri, 18 Jan 2008 00:52:28 GMT
Howdy Ant Friends,

I am having an issue with running a deploy script on a remote server.
This command works beautifully:

ssh -t /usr/local/bin/sudo -u myuser

But when I invoke this command using exec in ant the '-t' argument does
not get used.  Otherwise the remote script is run and everything looks
good (the app is deployed and jboss is started).  In the script, we run
the command 'nohup ./ &' and without the '-t' nohup is not used.
This results in the output that would normally go to nohup.out to be
dumped to the invoking shell and the build to hang because now the shell
is being used for the standard output jboss produces.  I have tried exec
with all <arg value="">, with <arg line=""> only, and various
combinations of the two.  My google and mail archive searches thus far
have been unsuccessful in finding a similar issue.  Any suggestions are
much appreciated.

My ant target:
   <target name="">
        <exec executable="ssh">
        <!--    <arg value="-t" />
                <arg value="${}" />
                <arg value="/usr/local/bin/sudo" />
                <arg value="-u" />
                <arg value="myuser" />
                <arg value="/path/to /" />-->
                <arg line="-t ${} /usr/local/bin/sudo -u
myuser /path/to /" />

Both the invoking server and remote server are running solaris.


Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message