This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Echo Stopped working

 
Dennis Putnam
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is odd. I am running the build script in this thread (http://www.coderanch.com/t/567843/tools/Linux-vs-Windows-jar-file). I have not resolved that problem but I am moving forward testing other things and for some reason the echo statements are being ignored. Even with debug on there is nary a peep from the echos. Can someone explain what is going on? I'm running this on Linux. For a while the echo statements were working fine then became intermittent and now do not work at all. TIA.
 
Dennis Putnam
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I may have stumbled on to the problem. I THINK when ant runs without a console something different happens. This build is being run from a script, which captures the output for analysis, in background which of course has no console. However, when I run the script from command line the echos work as expected. Anyone have any ideas? TIA.
 
Dennis Putnam
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have what I needed although I don't know why what I was doing doesn't work. I changed to use the ant -logfile option and read that into my script to analyze the results.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue could have been that the script that was running Ant didn't redirect the stdout/stderr to a file.
 
Dennis Putnam
Ranch Hand
Posts: 313
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I think there is a bug as I had another problem that unexpectedly turned out to be related to this one. The script didn't need to redirect, it was running ant using backticks to capture the output. Anyway the issue appears to be a problem running ant in background (i.e. without a console). When in background, echo does not work and replaceregexp also fails with a fatal error that does not occur from command line. There was an old bug on apache's bugzilla similar to this so I updated it with my information.

https://issues.apache.org/bugzilla/show_bug.cgi?id=34633
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic