• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Logging output with spawn="true" using exec

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am trying to do continue integration w/ luntbuild and it requires ant to output "BUILD SUCCESS" or result==0 in order to declare the build is successful

The last step of my build is to start tomcat. I basically just use:



to start tomcat, here is the dilemma, if I dont use spawn="true" it will hang indefinately and luntbuild will eventually give up and declare build failed. On the other hand, if i use spawn="true" it will show build success, but the output is not actually logged (as per doucmentation in ant 1.7).

What can I really do for luntbuild to recognize that tomcat has started and be able to meet the success build condition. I appreciate any help guys, really stuck here
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Herman, welcome to Java Ranch!

When you say "but the output is not actually logged", which output do you mean? The output from Tomcat? If so, here is the description of the exec spawn attribute from the Ant 1.7.1 manual:


spawn
whether or not you want the command to be spawned
Default is false.
If you spawn a command, its output will not be logged by ant.
The input, output, error, and result property settings are not active when spawning a process.
since Ant 1.6
 
Herman Chung
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the quick reply Peter!

Maybe I should reword my question. I think by using spawn="true", luntbuild somehow doesn't recognize "BUILD SUCCESSFUL" that was output by Ant. I am wondering if there is a way to know that tomcat has succesfully started in Ant without using spawn="true", because basically what ant will do is just hangs until tomcat is shutdown, then it will output "BUILD SUCCESSFUL".

Hope you can help me out Thanks!
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This sounds like something specific to luntbuild, which I have never used (didn't even know such a thing existed). Maybe someone with experience with luntbuild can help.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you ever find an answer to this problem? I am having a similar issue - I want Tomcat's startup to be logged to the console in Eclipse, and then after that I am executing a program, but the console output never finishes - I never see the "Build successful" message - I just see the Tomcat startup log - the rest of the ANT script doesn't go to the console.


 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi 'Flex Coder', please see your PM for an important admin message!
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Edwin, welcome to Java Ranch.

Your question, while similar to the original poster's, is not the same. Please start a new topic. And when you do please post the Ant target in question and the last few lines of the output that you do see.
 
ice is for people that are not already cool. Chill with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic