>Regardless of which build system you choose, there will be a learning curve. How much of a curve can greatly depend on how the build system behaves. If it is Ant based, it is going to be pretty verbose. If it is Maven or Buildr based, the verboseness is replaced by terseness and sometimes cryptic configuration files.
With this said, I recently decided that the PsychoPath XPath processor needed to migrate off of the Athena Common build script that it had been using to a Maven based build. The reason was two fold:
- I needed the ability to generate and eventually host a Maven repository for PsychoPath to help make it available outside of eclipse. PsychoPath is just a bundle, but doesn’t have specific OSGI dependencies so can be used outside of osgi container.
- Portability of the build script. While Athena itself is pretty portable, the underlining eclipse base builder, and the assumptions it makes on project configuration and layout can be difficult to work with at times and can be very system dependent.
- Speed. Even with PsychoPath, it takes on average 20 minutes to run the build, and test using Athena Common Builder. Much of this is due to the way the base builder and Athena setup the target platform.
- Average build time for Psychopath is number under 2 minutes.
- Test runs went from an average of 2 minutes to 46 seconds. This is still running all of the 8306 unit tests.
- A P2 update site is created and available for consumption and Maven repos are available as well.
- Pointing to which P2 repositories were needed and what dependencies to install was just a matter of adding the appropriate repository urls. Tycho figured out the dependencies and built just what was needed to build and run the tests.
A Maven based build is not without its disadvantages. In particular the fact that it downloads the Internet. However after the initial download and unless your upstream dependencies change it only needs to do this once. Nick has done some improvements to Athena in this area, but the reconstruction of the target platform and the p2 provisioning is the longest running portion of an Athena build. Almost half the time of the build is spent during provisioning.
After Helios is out, and things have settled down again. I’ll be migrating Robert’s contribution back into the main PsychoPath code base. The Hudson based build will be updated to use the new Maven build for the CI builds.
One item I have not yet figured out how to do correctly with Tycho and Maven, is to include Code Coverage plugins like Emma and Cobertura in the builds. The Instrumentation always seems to happen after the Tests have been run from the test plugin and not before the Test has been run. Any insights on how to get Instrumentation working correctly with Tycho would be appreciated.
Updated June 8, 2010: Information on using Emma using ECLEmma headless can be found here.
Updated July 8, 2010: Updated information on using ECLEmma with Tycho/Maven3 has been posted on the Sonatype wiki, “How to integrate EMMA with Tycho”.