How to capture [exec]

2008-01-08 Thread Z W
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

MS Powershell and Ant and Ping

2008-01-08 Thread Z W
Hi Gurus I have a powershell script MyPing.ps1 that pings different hosts. If any host is down, I would have a return code 2 to indicate ping failure to all hosts even though the script works fine and completes execution. However, I use ANT to execute this script using My understanding is t

Re: Load a file name into a property (using wildcards)

2008-01-08 Thread David Weintraub
Mistrake! should be: On Jan 8, 2008 9:00 PM, David Weintraub <[EMAIL PROTECTED]> wrote: > Something like this: > > > > > > > > > > > On Jan 8, 2008 2:01 PM, me youdonwannaknow <[EMAIL PROTECTED]> wrote: > > > > My apologies if my searching the manual, faq(s), and mail

Re: Load a file name into a property (using wildcards)

2008-01-08 Thread David Weintraub
Something like this: On Jan 8, 2008 2:01 PM, me youdonwannaknow <[EMAIL PROTECTED]> wrote: > > My apologies if my searching the manual, faq(s), and mail archive didn't > return the answer to this question. > > I know there'll be a single file matching a search criteria,

Re: String Manipulation

2008-01-08 Thread David Weintraub
Have you looked at the AntContrib tasks? http://ant-contrib.sourceforge.net/tasks/tasks/propertyregex.html This one should do the trick. Of course, you'll have to install the antContrib.jar and put a taskref in your build.xml, but this should work. On Jan 8, 2008 7:57 PM, DJ Kingsolver <[EMAIL P

String Manipulation

2008-01-08 Thread DJ Kingsolver
Hi all, I need to do a simple string manipulation, but I'm finding it harder than I expected. Say I have a property like this: I'd like to set another property like this: So, would write "[echo] foo_bar_baz" What is a good way to achieve this? I've thought about writing inputString to

Re: Ant and Ping

2008-01-08 Thread Z W
Hi Any other recommendations ? Thanks

Re: java.lang.NoClassDefFoundError after adding element to a java task

2008-01-08 Thread Luciano Resende
Thanks Martin, but all the necessary jars are in the CLASSPATH, and as mentioned on the e-mail, the program runs ok (no issues with noClassDefFoundError)... the noClassDefFoundError just start after adding the ... it seems that it loose the ability to read the classpath or it get lost... On Jan 8,

Re: java.lang.NoClassDefFoundError after adding element to a java task

2008-01-08 Thread Martin Gainty
from http://cwiki.apache.org/TUSCANY/sca-java-releases.html download jar tuscany-domain-api-1.1.1-incubating.jar and place on CLASSPATH M- - Original Message - From: "Luciano Resende" <[EMAIL PROTECTED]> To: Sent: Tuesday, January 08, 2008 2:11 PM Subject: java.lang.NoClassDefFoundError a

java.lang.NoClassDefFoundError after adding element to a java task

2008-01-08 Thread Luciano Resende
I have the following ant task : When I run this, everything goes ok, but when trying to exit I get the following exception : [java] java.security.AccessControlException:

RE: Load a file name into a property (using wildcards)

2008-01-08 Thread me youdonwannaknow
Forgot to mention... we're using Ant 1.6.5, and adding ant-contrib or other similar addon's is not an option. (btw, my original mailing said I'd tried using 'pathconvert' and 'available' tasks, but those got stripped out due to my use of surrounding those names w/ > and <). --

Load a file name into a property (using wildcards)

2008-01-08 Thread me youdonwannaknow
My apologies if my searching the manual, faq(s), and mail archive didn't return the answer to this question. I know there'll be a single file matching a search criteria, say, "dir logs/log.*.txt". I want to get the file name as a property value -- but w/out the wild card. My attempts using ,

RE: environment attribute

2008-01-08 Thread Barry Pape
Good call on the sub shells. Thanks for the help! -Original Message- From: Chuck Holzwarth [mailto:[EMAIL PROTECTED] Sent: Monday, January 07, 2008 8:17 AM To: Ant Users List Subject: RE: environment attribute Try using the ant exec task to run the env command. Are you sure the HOSTNAME

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread John Hendrie
Is the buffering done in a logger or is it internal to Ant i.e. does Ant wait for the line break and then flush the buffer to the logger or does logger wait for the line break? Thanks! On Jan 8, 2008 4:27 PM, Dominique Devienne <[EMAIL PROTECTED]> wrote: > On Jan 8, 2008 10:12 AM, Gary Gregory <

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread Dominique Devienne
On Jan 8, 2008 10:12 AM, Gary Gregory <[EMAIL PROTECTED]> wrote: > You could call [1] the Ant task "echo" [2] from your Java code. Which will do a println, not a print. I don't think there's any way around the buffering Ant does, unless the logging code is modified explicitly to support it. --DD

RE: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread Gary Gregory
You could call [1] the Ant task "echo" [2] from your Java code. Gary [1] http://ant.apache.org/manual/antexternal.html [2] http://ant.apache.org/manual/CoreTasks/echo.html > -Original Message- > From: John Hendrie [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 08, 2008 3:55 AM > To:

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread John Hendrie
> > I don't think so; not if your Jython code run within Ant, and you > don't want to hack the Ant code itself. --DD I suspected as much. Thanks to everyone for their help!

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread Dominique Devienne
On Jan 8, 2008 9:16 AM, John Hendrie <[EMAIL PROTECTED]> wrote: > Thanks for the explanation. What I'm trying to do is have an embedded python > console (using Jython). I'm printing a python prompt (>>>) using > System.out.print() then waiting for user input. Is there any other way I > could do thi

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread John Hendrie
Hi, Thanks for the explanation. What I'm trying to do is have an embedded python console (using Jython). I'm printing a python prompt (>>>) using System.out.print() then waiting for user input. Is there any other way I could do this using Ant (without having to go into the internals of Ant)? Than

AW: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread Jan.Materne
> On Jan 8, 2008 5:54 AM, John Hendrie <[EMAIL PROTECTED]> wrote: > > public class Main { > > public static void main(String[] args) { > > System.out.print("Hello"); [...] > > } > > } > > > > Ant doesn't output "Hello", I have to exit the Java app for > it to appear. > > Any ideas

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread Dominique Devienne
On Jan 8, 2008 5:54 AM, John Hendrie <[EMAIL PROTECTED]> wrote: > public class Main { > public static void main(String[] args) { > System.out.print("Hello"); [...] > } > } > > Ant doesn't output "Hello", I have to exit the Java app for it to appear. > Any ideas on how I can solve th

Re: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread John Hendrie
Hi, Thanks for your reply. The build files are auto-generated by Netbeans 6 and due to the size of them I can't post them here (mailer rejects the email). I've posted the run target below: The variable ${application.args} is:

AW: Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread Jan.Materne
What is your buildfile? Jan > -Ursprüngliche Nachricht- > Von: John Hendrie [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 8. Januar 2008 12:55 > An: user@ant.apache.org > Betreff: Getting Ant to print the arguments of > System.out.print() calls > > Hi, > > I'm sorry if this is a re

Getting Ant to print the arguments of System.out.print() calls

2008-01-08 Thread John Hendrie
Hi, I'm sorry if this is a really obvious question but I'm having trouble getting Ant to print System.out.print() calls. The archive throws up a few related posts but with no answers. I have a simple example: public class Main { public static void main(String[] args) { System.out.pr

Re: Easier Way To Check and Install jars

2008-01-08 Thread David Brown
I have a suspicion you can do this without the Antcall. If I get a chance I will look at some builds I have. My current gig does not allow internet access at work. I'll take a look back in 12 hours. Francisco Tolmasky wrote .. > I wrote up a "short" install target in my ant file to make sure I h

Re: Ant and Ping

2008-01-08 Thread David Brown
Maybe try beanshell or JMeter with JMeter Ant task with beanshell. And, you won't need cygwin. Z W wrote .. > Hi Gurus > > Is there a jar file out there that provides ping task to verify if a host > connection is working ? > > Another approach I have is to use cgwin with ant > > > failonerro

AW: AW: AW: Easier Way To Check and Install jars

2008-01-08 Thread Jan.Materne
I think you have to use a nested . See the manual ... Jan > -Ursprüngliche Nachricht- > Von: Francisco Tolmasky [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 8. Januar 2008 07:43 > An: Ant Users List > Betreff: Re: AW: AW: Easier Way To Check and Install jars > > No, I want the oppos