Eclipse CDT Headless构建在构建完成后挂起 [英] Eclipse CDT Headless build hangs after build is finished

查看:200
本文介绍了Eclipse CDT Headless构建在构建完成后挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为使用GNU-ARM-ECLIPSE插件的GNU-ARM工具链构建的嵌入式应用程序实现Continuous Integration Server。因此,我需要从服务器上的命令行编译CDT项目(我想编译Debug,Release和UnitTests构建,然后运行测试)。



我打算使用Eclipse Headless构建(请参阅此处)。



我得到的问题是构建后,我没有得到提示(在Windows CMD或Powershell上),因此我无法运行测试。而且,CI服务器还抱怨构建未成功,但是一切正常。如果我在命令完成后将其杀死,则可以运行测试,但是没有一种可接受的方式可以在服务器上使用脚本或批处理文件来做到这一点。



<事实证明,这只是Windows的问题,因为在Mac或Linux上,我没有这个问题。我们的服务器是TFS服务器,因此必须在Windows上运行。



此外,它可能与eclipse项目的设置有关,因为我尝试了使用基本的Hello-World项目,并且工作正常。任何提示或帮助将不胜感激。

解决方案

我遇到了与您相同的问题,并通过更改选项顺序来解决它(不要



遇到问题的cmd:

  eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data {myWorkspace} -import {myProject} -build project / target 

对我有用的cmd:

  eclipse --launcher.suppressErrors -nosplash -data {myWorkspace} -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import {myProject} -build project / target 


I am in the process of implementing a Continuous Integration Server for our embedded application built with the GNU-ARM toolchain with the GNU-ARM-ECLIPSE plugin. Therefore, I need to compile our CDT project from the command line on the server (I want to compile the Debug, Release and UnitTests builds, and then run the tests).

I was planning to use the Eclipse Headless builds (see here).

The problem I am getting is that after building, I don't get the prompt back (on windows CMD or Powershell), and so I cannot run the tests. And also, the CI server complains that the build was not successful, but everything builds fine. If I kill the command after it is completed, I can run the tests, but there is no acceptable way I could do that with a script or batch file when on the server.

It turns out that this is a Windows only problem, because on the mac or on linux, I don't have that problem. Our server is a TFS server, therefore it has to work on Windows.

Also, it might be related to how the eclipse project is setup because I tried it with a basic Hello-World project, and it works fine. Any hints or help would be greatly appreciated.

解决方案

I had the same issue as yours and resolved it by changing options order (don't ask me why).

The cmd that have your problem :

eclipse --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data {myWorkspace} -import {myProject} -build "project/target"

the cmd that did work for me :

eclipse --launcher.suppressErrors -nosplash -data {myWorkspace} -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import {myProject} -build "project/target"

这篇关于Eclipse CDT Headless构建在构建完成后挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆