Build an Eclipse workspace with TeamCity
Question: I am in the process of converting our existing custom continuous build system
to use TeamCity. This appears to work well for most of our build scenarios but
one.

We have a hardware project that is set up to build using Eclipse configured
with a specific set of tool chains. Developers run the IDE, and for lack of an
Eclipse build runner, TeamCity builds the project from the commandline runner
using python scripts.

The TeamCity build process is as follows:

  * Delete the contents of the Eclipse workspace.
  * import all the Eclipse projects into the workspace.
  * build the workspace.

The problems with this approach are as follows:

  * There is no build runner for Eclipse. The scripts work, but there is overhead in developing and maintaining the scripts. This is the very thing we are trying to get away from.
  * There is no TeamCity parsing of the output (gcc and eclipse). I have to redirect the eclipse output to file, and when the Eclipse process finishes, parse the file for errors, warnings, progress status, etc., in order to inject the appropriate TeamCity service message to stdout. Again this kind of overhead is the very thing we are trying to get away from.

Given no Eclipse build runner just days away from release, is there a better
mechanism for loading and building an Eclipse workspace with TeamCity?

Given the commandline runner script solution, is there a better machnism for
capturing and displaying errors, warnings, etc.?


Answer: This may not be the best approach for you at this particular time in your
release cycle, given that you are so close to your release deadline, but I
would use Maven for the build and use the M2E plugin to provide Maven
integration inside of Eclipse.

While using Maven as a build tool is usually not overly complex, it is
sometimes not trivial to convert an existing project to use it.

I would suggest that you start off your next release cycle by enabling Maven
as your build tool - TeamCity fully supports the Maven build runner.

