ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: determine what shellscript just ran
Date Sun, 15 Jan 2012 04:09:50 GMT
Why not create a macrodef that echoes the input command and then calls the ant-contrib task?

From my HTC Sensation 4G on T-Mobile. The first nationwide 4G network

----- Reply message -----
From: "Peter Reilly" <>
To: "Ant Users List" <>
Subject: determine what shellscript just ran
Date: Sat, Jan 14, 2012 1:37 pm

The only way I can see, is to set shell into debug mode, using set -x

<antcontrib:shellscript shell="bash" failonerror="true">
  set -x
   ls -l /tmp

On Fri, Jan 13, 2012 at 8:16 PM, grayaii <> wrote:
> A lot of our build.xmls contain things like this, where “ls -l /tmp” is just
> some arbitrary command:
> <antcontrib:shellscript shell="bash" failonerror="true">
>                ls -l /tmp
> </antcontrib:shellscript>
> When you run this (with verbosity on), you get the output of ls. So far so
> good.
> What you *don’t* get is what command just ran.  In this case, we do not see
> “ls -l /tmp” anywhere in ant's output!
> The only thing you do see is the name of shell script that was generated
> on-the-fly :
> [antcontrib:shellscript] Executing 'bash' with arguments:
> [antcontrib:shellscript] '/tmp/script1463789709null'
> Do you know how to get ant to echo what just ran?
> I have a bunch of build logs (which is just the output of ant), and I can't
> tell what command caused what output.
> --
> View this message in context:
> Sent from the Ant - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

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