Eclipse 中的无头构建:如何检索结果值
我正在尝试使用 Eclipse CDT 的 headlessbuild 功能将 Eclipse 与 TeamCity 集成。我使用命令行调用来构建我的项目,如 这个问题< /a>.如果出现编译错误,则会弹出消息框,提示“Java 已启动,但返回退出代码=1”。我不想收到此消息,而是获取返回代码,以便我可以在脚本中进一步处理它。有什么办法可以做到这一点吗?
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以抑制弹出窗口并重定向输出以包含在脚本中:
据我所知,需要在 GUI 中跟踪错误,因为无头模式尚不支持来自子任务的非常好的错误报告。
从那里我使用基于 GUI 的构建的输出来缩小项目构建失败的原因。
来源:
http://dev.eclipse.org/mhonarc/列表/cdt-dev/msg15343.html
http://www.eclipse.org/forums/index.php?t=msg&goto=481938&S=c88d71260a7d130eebdccb8f2e553 7f2
http://www.eclipse.org/forums/index.php?t=msg&goto=481938&S=c88d71260a7d130eebdccb8f2e5537f2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209080#c21
You can suppress the popup and redirect output to be included with your script:
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:
http://dev.eclipse.org/mhonarc/lists/cdt-dev/msg15343.html
http://www.eclipse.org/forums/index.php?t=msg&goto=481938&S=c88d71260a7d130eebdccb8f2e5537f2
http://www.eclipse.org/forums/index.php?t=msg&goto=481938&S=c88d71260a7d130eebdccb8f2e5537f2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=209080#c21