ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Z W" <mpc8...@gmail.com>
Subject How to capture [exec]
Date Wed, 09 Jan 2008 04:56:06 GMT
Hi

I have a Powershell script that contains the line "exit 2" when ping fails
>From Ant, it's showing

_ping:
     [echo]  Inside _build_ping_alive module
     [exec] Pinging host1 ...
     [exec] success
     [exec] Pinging host2 ...
     [exec] error: 11010 occurred
     [exec] LastExitCode: 0
     [exec] error.count: 0
     [exec] *Result: 1*
How to I capture the 1 with Ant ?
In Ant, I have

<exec dir="." executable="powershell" os="Windows XP" timeout="10000"
failonerror="false"

resultproperty="build_main.debug">

<arg line="./MyPing host2"/>

</exec>
 Thanks

**

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