问题
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.
回答1:
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"
来源:https://stackoverflow.com/questions/40115104/eclipse-cdt-headless-build-hangs-after-build-is-finished