aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Echo Stopped working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Echo Stopped working" Watch "Echo Stopped working" New topic
Author

Echo Stopped working

Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 210
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

Joined: Feb 03, 2012
Posts: 210
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

Joined: Feb 03, 2012
Posts: 210
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

Joined: May 14, 2008
Posts: 5779
    
    7

The issue could have been that the script that was running Ant didn't redirect the stdout/stderr to a file.


JBoss In Action
Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 210
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Echo Stopped working
 
Similar Threads
Editor for linux
setting Linux Java environment
top 20 linux commands
Creating Platform independent scripts(Solaris and Linux)
checking Weblogic status in Weblogic UNIX/Linux