>The Importance of External Builds

>Over reliance on an IDE for builds can lead to a false comfort factor. The importance of a build that isn’t affected by any particular IDE configuration or way of building was beaten home this weekend. I was working on some eclipse plugins that ran fine when launched from within eclipse for testing. However, the external Maven 3/Tycho build would fail running the same tests.

After many, many. many hours of debugging and chasing around. The ultimate culprit turned out to be some missing entries in the build.properties file. My clue should have been the NoClassDefFoundErrors I was getting, but I thought these were related to some funky classloading the application does. However it turned out to be some missing bin.include entries.
Eclipse itself when using PDE didn’t care when testing and launching from the workspace. However, Tycho does care as it uses the build.properties file to package the plugins. It was this different behavior for how PDE works and how Tycho works that caused me the grief.
Tycho in this case was absolutely correct for failing the tests. I could have just said, well “It works in my environment” and left it at that, but honestly that just rubs me the wrong way. If it doesn’t work on the build machine, it doesn’t work.
The thing I like about Maven 3 and Tycho, is how easy it is to reproduce the build locally. I was able to reproduce the problem locally by simply using git-svn and running the build from the command line. Git SVN allowed me to debug and run local builds while being able to still commit local changes, back them out, and basically not do a lot of burn and churn on the build machine.
It is important to verify that the build works out side your IDE dev environment, it can and will reveal hidden errors that the IDE masks.
This entry was posted in build, clean code, craftsmanship, eclipse, release engineering. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s