Philipp
Philipp

Reputation: 11813

Headless build in Eclipse: how to retrieve result value

I'm trying to use Eclipse CDT's headlessbuild feature for integrating Eclipse with TeamCity. I use a command line call to build my projects as descriped in this question. If there is a compilation error, a message box pops up saying "Java was started but returned exit code=1". I'd rather not have this message but get the return code so I can process it further in my script. Is there any way to do this?

Thanks!

Upvotes: 4

Views: 1857

Answers (1)

Will Bickford
Will Bickford

Reputation: 5386

You can suppress the popup and redirect output to be included with your script:

  • Add "--launcher.suppressErrors" to your command line arguments for eclipse

The error needs to be tracked down in the GUI from what I can tell, because the headless mode doesn't support very good error reporting from sub-tasks yet.

From there I used output from the GUI-based build to narrow down why my project failed to build.

Sources:

Upvotes: 4

Related Questions